]> git.neil.brown.name Git - history.git/commitdiff
XFS: Switch to native endian internal representation for extents
authorStephen Lord <lord@sgi.com>
Tue, 15 Oct 2002 01:16:03 +0000 (03:16 +0200)
committerChristoph Hellwig <hch@sgi.com>
Tue, 15 Oct 2002 01:16:03 +0000 (03:16 +0200)
Switch xfs from using a big endian internal representation for
the in memory copy of extents to a host byte order representation.
The internal extents are read in once, then modified seperately
from the on disk ones. Since we search and manipulate the extents
multiple times, it is cheaper to convert them to host byte order
once and then keep them in that format. Worth about 5 to 10%
reduction in cpu time for some loads. Complicated by the fact
that the in memory extents are written out to the log sometimes,
and when expanding extents are used to write out the initial
block of extents.

Modid: 2.5.x-xfs:slinx:129646a

fs/xfs/xfs_bmap.c
fs/xfs/xfs_bmap_btree.c
fs/xfs/xfs_bmap_btree.h
fs/xfs/xfs_btree.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.h
fs/xfs/xfs_inode_item.c
fs/xfs/xfs_inode_item.h
fs/xfs/xfsidbg.c

index d947d23fa19f8f31e7af8e7d7b7ea150023708c9..d89a4a83d611f4ebfe70203154f7b1b3c706f7f0 100644 (file)
@@ -3174,7 +3174,7 @@ xfs_bmap_extents_to_btree(
        xfs_btree_cur_t         *cur;           /* bmap btree cursor */
        xfs_bmbt_rec_t          *ep;            /* extent list pointer */
        int                     error;          /* error return value */
-       xfs_extnum_t            i;              /* extent list index */
+       xfs_extnum_t            i, cnt;         /* extent list index */
        xfs_ifork_t             *ifp;           /* inode fork pointer */
        xfs_bmbt_key_t          *kp;            /* root block key pointer */
        xfs_mount_t             *mp;            /* mount structure */
@@ -3256,24 +3256,25 @@ xfs_bmap_extents_to_btree(
        ablock = XFS_BUF_TO_BMBT_BLOCK(abp);
        INT_SET(ablock->bb_magic, ARCH_CONVERT, XFS_BMAP_MAGIC);
        INT_ZERO(ablock->bb_level, ARCH_CONVERT);
-       INT_ZERO(ablock->bb_numrecs, ARCH_CONVERT);
        INT_SET(ablock->bb_leftsib, ARCH_CONVERT, NULLDFSBNO);
        INT_SET(ablock->bb_rightsib, ARCH_CONVERT, NULLDFSBNO);
        arp = XFS_BMAP_REC_IADDR(ablock, 1, cur);
        nextents = ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t);
-       for (ep = ifp->if_u1.if_extents, i = 0; i < nextents; i++, ep++) {
+       for (ep = ifp->if_u1.if_extents, cnt = i = 0; i < nextents; i++, ep++) {
                if (!ISNULLSTARTBLOCK(xfs_bmbt_get_startblock(ep))) {
-                       *arp++ = *ep;
-                       INT_MOD(ablock->bb_numrecs, ARCH_CONVERT, +1);
+                       arp->l0 = INT_GET(ep->l0, ARCH_CONVERT);
+                       arp->l1 = INT_GET(ep->l1, ARCH_CONVERT);
+                       arp++; cnt++;
                }
        }
+       INT_SET(ablock->bb_numrecs, ARCH_CONVERT, cnt);
        ASSERT(INT_GET(ablock->bb_numrecs, ARCH_CONVERT) == XFS_IFORK_NEXTENTS(ip, whichfork));
        /*
         * Fill in the root key and pointer.
         */
        kp = XFS_BMAP_KEY_IADDR(block, 1, cur);
        arp = XFS_BMAP_REC_IADDR(ablock, 1, cur);
-       INT_SET(kp->br_startoff, ARCH_CONVERT, xfs_bmbt_get_startoff(arp));
+       INT_SET(kp->br_startoff, ARCH_CONVERT, xfs_bmbt_disk_get_startoff(arp));
        pp = XFS_BMAP_PTR_IADDR(block, 1, cur);
        INT_SET(*pp, ARCH_CONVERT, args.fsbno);
        /*
@@ -4332,7 +4333,7 @@ xfs_bmap_read_extents(
 #ifdef XFS_BMAP_TRACE
        static char             fname[] = "xfs_bmap_read_extents";
 #endif
-       xfs_extnum_t            i;      /* index into the extents list */
+       xfs_extnum_t            i, j;   /* index into the extents list */
        xfs_ifork_t             *ifp;   /* fork structure */
        int                     level;  /* btree level, for checking */
        xfs_mount_t             *mp;    /* file system mount structure */
@@ -4389,7 +4390,7 @@ xfs_bmap_read_extents(
         * Loop over all leaf nodes.  Copy information to the extent list.
         */
        for (;;) {
-               xfs_bmbt_rec_t  *frp;
+               xfs_bmbt_rec_t  *frp, *temp;
                xfs_fsblock_t   nextbno;
                xfs_extnum_t    num_recs;
 
@@ -4417,18 +4418,21 @@ xfs_bmap_read_extents(
                 */
                frp = XFS_BTREE_REC_ADDR(mp->m_sb.sb_blocksize, xfs_bmbt,
                        block, 1, mp->m_bmap_dmxr[0]);
-               memcpy(trp, frp, num_recs * sizeof(*frp));
+               temp = trp;
+               for (j = 0; j < num_recs; j++, frp++, trp++) {
+                       trp->l0 = INT_GET(frp->l0, ARCH_CONVERT);
+                       trp->l1 = INT_GET(frp->l1, ARCH_CONVERT);
+               }
                if (exntf == XFS_EXTFMT_NOSTATE) {
                        /*
                         * Check all attribute bmap btree records and
                         * any "older" data bmap btree records for a
                         * set bit in the "extent flag" position.
                         */
-                       if (xfs_check_nostate_extents(trp, num_recs)) {
+                       if (xfs_check_nostate_extents(temp, num_recs)) {
                                goto error0;
                        }
                }
-               trp += num_recs;
                i += num_recs;
                xfs_trans_brelse(tp, bp);
                bno = nextbno;
@@ -6257,7 +6261,7 @@ xfs_bmap_count_leaves(
        int             b;
 
        for ( b = 1; b <= numrecs; b++, frp++)
-               *count += xfs_bmbt_get_blockcount(frp);
+               *count += xfs_bmbt_disk_get_blockcount(frp);
        return 0;
 }
 
index 4e41699fbb6304812262bc317893da1e4f3520ae..f13181dd97c81d800f6f409b4403e67cb87a1064 100644 (file)
@@ -207,7 +207,7 @@ xfs_bmbt_trace_argifr(
        xfs_bmbt_irec_t         s;
 
        d = (xfs_dfsbno_t)f;
-       xfs_bmbt_get_all(r, &s);
+       xfs_bmbt_disk_get_all(r, &s);
        o = (xfs_dfiloff_t)s.br_startoff;
        b = (xfs_dfsbno_t)s.br_startblock;
        c = s.br_blockcount;
@@ -396,7 +396,7 @@ xfs_bmbt_delrec(
                        xfs_bmbt_log_recs(cur, bp, ptr, numrecs - 1);
                }
                if (ptr == 1) {
-                       INT_SET(key.br_startoff, ARCH_CONVERT, xfs_bmbt_get_startoff(rp));
+                       INT_SET(key.br_startoff, ARCH_CONVERT, xfs_bmbt_disk_get_startoff(rp));
                        kp = &key;
                }
        }
@@ -711,10 +711,10 @@ xfs_bmbt_get_rec(
                return 0;
        }
        rp = XFS_BMAP_REC_IADDR(block, ptr, cur);
-       *off = xfs_bmbt_get_startoff(rp);
-       *bno = xfs_bmbt_get_startblock(rp);
-       *len = xfs_bmbt_get_blockcount(rp);
-       *state = xfs_bmbt_get_state(rp);
+       *off = xfs_bmbt_disk_get_startoff(rp);
+       *bno = xfs_bmbt_disk_get_startblock(rp);
+       *len = xfs_bmbt_disk_get_blockcount(rp);
+       *state = xfs_bmbt_disk_get_state(rp);
        *stat = 1;
        return 0;
 }
@@ -757,7 +757,8 @@ xfs_bmbt_insrec(
        XFS_BMBT_TRACE_CURSOR(cur, ENTRY);
        XFS_BMBT_TRACE_ARGIFR(cur, level, *bnop, recp);
        ncur = (xfs_btree_cur_t *)0;
-       INT_SET(key.br_startoff, ARCH_CONVERT, xfs_bmbt_get_startoff(recp));
+       INT_SET(key.br_startoff, ARCH_CONVERT,
+               xfs_bmbt_disk_get_startoff(recp));
        optr = ptr = cur->bc_ptrs[level];
        if (ptr == 0) {
                XFS_BMBT_TRACE_CURSOR(cur, EXIT);
@@ -835,7 +836,7 @@ xfs_bmbt_insrec(
                                                }
 #endif
                                                ptr = cur->bc_ptrs[level];
-                                               xfs_bmbt_set_allf(&nrec,
+                                               xfs_bmbt_disk_set_allf(&nrec,
                                                        nkey.br_startoff, 0, 0,
                                                        XFS_EXT_NORM);
                                        } else {
@@ -1175,7 +1176,7 @@ xfs_bmbt_lookup(
                                        startoff = INT_GET(kkp->br_startoff, ARCH_CONVERT);
                                } else {
                                        krp = krbase + keyno - 1;
-                                       startoff = xfs_bmbt_get_startoff(krp);
+                                       startoff = xfs_bmbt_disk_get_startoff(krp);
                                }
                                diff = (xfs_sfiloff_t)
                                                (startoff - rp->br_startoff);
@@ -1356,7 +1357,8 @@ xfs_bmbt_lshift(
        } else {
                memmove(rrp, rrp + 1, rrecs * sizeof(*rrp));
                xfs_bmbt_log_recs(cur, rbp, 1, rrecs);
-               INT_SET(key.br_startoff, ARCH_CONVERT, xfs_bmbt_get_startoff(rrp));
+               INT_SET(key.br_startoff, ARCH_CONVERT,
+                       xfs_bmbt_disk_get_startoff(rrp));
                rkp = &key;
        }
        if ((error = xfs_bmbt_updkey(cur, rkp, level + 1))) {
@@ -1470,7 +1472,8 @@ xfs_bmbt_rshift(
                memmove(rrp + 1, rrp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rrp));
                *rrp = *lrp;
                xfs_bmbt_log_recs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1);
-               INT_SET(key.br_startoff, ARCH_CONVERT, xfs_bmbt_get_startoff(rrp));
+               INT_SET(key.br_startoff, ARCH_CONVERT,
+                       xfs_bmbt_disk_get_startoff(rrp));
                rkp = &key;
        }
        INT_MOD(left->bb_numrecs, ARCH_CONVERT, -1);
@@ -1639,7 +1642,7 @@ xfs_bmbt_split(
                rrp = XFS_BMAP_REC_IADDR(right, 1, cur);
                memcpy(rrp, lrp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rrp));
                xfs_bmbt_log_recs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT));
-               keyp->br_startoff = xfs_bmbt_get_startoff(rrp);
+               keyp->br_startoff = xfs_bmbt_disk_get_startoff(rrp);
        }
        INT_MOD(left->bb_numrecs, ARCH_CONVERT, -(INT_GET(right->bb_numrecs, ARCH_CONVERT)));
        right->bb_rightsib = left->bb_rightsib; /* INT_: direct copy */
@@ -1874,17 +1877,16 @@ xfs_bmbt_delete(
  * This code must be in sync with the routines xfs_bmbt_get_startoff,
  * xfs_bmbt_get_startblock, xfs_bmbt_get_blockcount and xfs_bmbt_get_state.
  */
-void
-xfs_bmbt_get_all(
-       xfs_bmbt_rec_t  *r,
-       xfs_bmbt_irec_t *s)
+
+static __inline__ void
+__xfs_bmbt_get_all(
+               __uint64_t l0,
+               __uint64_t l1,
+               xfs_bmbt_irec_t *s)
 {
        int     ext_flag;
        xfs_exntst_t st;
-       __uint64_t      l0, l1;
 
-       l0 = INT_GET(r->l0, ARCH_CONVERT);
-       l1 = INT_GET(r->l1, ARCH_CONVERT);
        ext_flag = (int)(l0 >> (64 - BMBT_EXNTFLAG_BITLEN));
        s->br_startoff = ((xfs_fileoff_t)l0 &
                           XFS_MASK64LO(64 - BMBT_EXNTFLAG_BITLEN)) >> 9;
@@ -1898,6 +1900,8 @@ xfs_bmbt_get_all(
 
                b = (((xfs_dfsbno_t)l0 & XFS_MASK64LO(9)) << 43) |
                    (((xfs_dfsbno_t)l1) >> 21);
+               if (!((b >> 32) == 0 || ISNULLDSTARTBLOCK(b)))
+                       printk("b == 0x%llx NULL %d\n", b, ISNULLDSTARTBLOCK(b));
                ASSERT((b >> 32) == 0 || ISNULLDSTARTBLOCK(b));
                s->br_startblock = (xfs_fsblock_t)b;
        }
@@ -1915,6 +1919,14 @@ xfs_bmbt_get_all(
        s->br_state = st;
 }
 
+void
+xfs_bmbt_get_all(
+       xfs_bmbt_rec_t  *r,
+       xfs_bmbt_irec_t *s)
+{
+       __xfs_bmbt_get_all(r->l0, r->l1, s);
+}
+
 /*
  * Get the block pointer for the given level of the cursor.
  * Fill in the buffer pointer, if applicable.
@@ -1941,22 +1953,93 @@ xfs_bmbt_get_block(
 }
 
 /*
- * Extract the blockcount field from a bmap extent record.
+ * Extract the blockcount field from an in memory bmap extent record.
  */
 xfs_filblks_t
 xfs_bmbt_get_blockcount(
        xfs_bmbt_rec_t  *r)
 {
-       return (xfs_filblks_t)(INT_GET(r->l1, ARCH_CONVERT) & XFS_MASK64LO(21));
+       return (xfs_filblks_t)(r->l1 & XFS_MASK64LO(21));
 }
 
 /*
- * Extract the startblock field from a bmap extent record.
+ * Extract the startblock field from an in memory bmap extent record.
  */
 xfs_fsblock_t
 xfs_bmbt_get_startblock(
        xfs_bmbt_rec_t  *r)
 {
+#if XFS_BIG_FILESYSTEMS
+       return (((xfs_fsblock_t)r->l0 & XFS_MASK64LO(9)) << 43) |
+              (((xfs_fsblock_t)r->l1) >> 21);
+#else
+#ifdef DEBUG
+       xfs_dfsbno_t    b;
+
+       b = (((xfs_dfsbno_t)r->l0 & XFS_MASK64LO(9)) << 43) |
+           (((xfs_dfsbno_t)r->l1) >> 21);
+       ASSERT((b >> 32) == 0 || ISNULLDSTARTBLOCK(b));
+       return (xfs_fsblock_t)b;
+#else  /* !DEBUG */
+       return (xfs_fsblock_t)(((xfs_dfsbno_t)r->l1) >> 21);
+#endif /* DEBUG */
+#endif /* XFS_BIG_FILESYSTEMS */
+}
+
+/*
+ * Extract the startoff field from an in memory bmap extent record.
+ */
+xfs_fileoff_t
+xfs_bmbt_get_startoff(
+       xfs_bmbt_rec_t  *r)
+{
+       return ((xfs_fileoff_t)r->l0 &
+                XFS_MASK64LO(64 - BMBT_EXNTFLAG_BITLEN)) >> 9;
+}
+
+xfs_exntst_t
+xfs_bmbt_get_state(
+       xfs_bmbt_rec_t  *r)
+{
+       int     ext_flag;
+
+       ext_flag = (int)((r->l0) >> (64 - BMBT_EXNTFLAG_BITLEN));
+       return xfs_extent_state(xfs_bmbt_get_blockcount(r),
+                               ext_flag);
+}
+
+#if ARCH_CONVERT != ARCH_NOCONVERT
+/* Endian flipping versions of the bmbt extraction functions */
+void
+xfs_bmbt_disk_get_all(
+       xfs_bmbt_rec_t  *r,
+       xfs_bmbt_irec_t *s)
+{
+       __uint64_t      l0, l1;
+
+       l0 = INT_GET(r->l0, ARCH_CONVERT);
+       l1 = INT_GET(r->l1, ARCH_CONVERT);
+
+       __xfs_bmbt_get_all(l0, l1, s);
+}
+
+/*
+ * Extract the blockcount field from an on disk bmap extent record.
+ */
+xfs_filblks_t
+xfs_bmbt_disk_get_blockcount(
+       xfs_bmbt_rec_t  *r)
+{
+       return (xfs_filblks_t)(INT_GET(r->l1, ARCH_CONVERT) & XFS_MASK64LO(21));
+}
+
+/*
+ * Extract the startblock field from an on disk bmap extent record.
+ */
+xfs_fsblock_t
+xfs_bmbt_disk_get_startblock(
+       xfs_bmbt_rec_t  *r)
+{
 #if XFS_BIG_FILESYSTEMS
        return (((xfs_fsblock_t)INT_GET(r->l0, ARCH_CONVERT) & XFS_MASK64LO(9)) << 43) |
               (((xfs_fsblock_t)INT_GET(r->l1, ARCH_CONVERT)) >> 21);
@@ -1975,10 +2058,10 @@ xfs_bmbt_get_startblock(
 }
 
 /*
- * Extract the startoff field from a bmap extent record.
+ * Extract the startoff field from a disk format bmap extent record.
  */
 xfs_fileoff_t
-xfs_bmbt_get_startoff(
+xfs_bmbt_disk_get_startoff(
        xfs_bmbt_rec_t  *r)
 {
        return ((xfs_fileoff_t)INT_GET(r->l0, ARCH_CONVERT) &
@@ -1986,15 +2069,16 @@ xfs_bmbt_get_startoff(
 }
 
 xfs_exntst_t
-xfs_bmbt_get_state(
+xfs_bmbt_disk_get_state(
        xfs_bmbt_rec_t  *r)
 {
        int     ext_flag;
 
        ext_flag = (int)((INT_GET(r->l0, ARCH_CONVERT)) >> (64 - BMBT_EXNTFLAG_BITLEN));
-       return xfs_extent_state(xfs_bmbt_get_blockcount(r),
+       return xfs_extent_state(xfs_bmbt_disk_get_blockcount(r),
                                ext_flag);
 }
+#endif
 
 
 /*
@@ -2103,7 +2187,7 @@ xfs_bmbt_insert(
        XFS_BMBT_TRACE_CURSOR(cur, ENTRY);
        level = 0;
        nbno = NULLFSBLOCK;
-       xfs_bmbt_set_all(&nrec, &cur->bc_rec.b);
+       xfs_bmbt_disk_set_all(&nrec, &cur->bc_rec.b);
        ncur = (xfs_btree_cur_t *)0;
        pcur = cur;
        do {
@@ -2387,6 +2471,97 @@ xfs_bmbt_set_all(
 #if XFS_BIG_FILESYSTEMS
        ASSERT((s->br_startblock & XFS_MASK64HI(12)) == 0);
 #endif /* XFS_BIG_FILESYSTEMS */
+#if XFS_BIG_FILESYSTEMS
+       r->l0 = ((xfs_bmbt_rec_base_t)extent_flag << 63) |
+                ((xfs_bmbt_rec_base_t)s->br_startoff << 9) |
+                ((xfs_bmbt_rec_base_t)s->br_startblock >> 43);
+       r->l1 = ((xfs_bmbt_rec_base_t)s->br_startblock << 21) |
+                ((xfs_bmbt_rec_base_t)s->br_blockcount &
+                (xfs_bmbt_rec_base_t)XFS_MASK64LO(21));
+#else  /* !XFS_BIG_FILESYSTEMS */
+       if (ISNULLSTARTBLOCK(s->br_startblock)) {
+               r->l0 = ((xfs_bmbt_rec_base_t)extent_flag << 63) |
+                       ((xfs_bmbt_rec_base_t)s->br_startoff << 9) |
+                         (xfs_bmbt_rec_base_t)XFS_MASK64LO(9);
+               r->l1 = XFS_MASK64HI(11) |
+                         ((xfs_bmbt_rec_base_t)s->br_startblock << 21) |
+                         ((xfs_bmbt_rec_base_t)s->br_blockcount &
+                          (xfs_bmbt_rec_base_t)XFS_MASK64LO(21));
+       } else {
+               r->l0 = ((xfs_bmbt_rec_base_t)extent_flag << 63) |
+                       ((xfs_bmbt_rec_base_t)s->br_startoff << 9);
+               r->l1 = ((xfs_bmbt_rec_base_t)s->br_startblock << 21) |
+                         ((xfs_bmbt_rec_base_t)s->br_blockcount &
+                          (xfs_bmbt_rec_base_t)XFS_MASK64LO(21));
+       }
+#endif /* XFS_BIG_FILESYSTEMS */
+}
+
+/*
+ * Set all the fields in a bmap extent record from the arguments.
+ */
+void
+xfs_bmbt_set_allf(
+       xfs_bmbt_rec_t  *r,
+       xfs_fileoff_t   o,
+       xfs_fsblock_t   b,
+       xfs_filblks_t   c,
+       xfs_exntst_t    v)
+{
+       int     extent_flag;
+
+       ASSERT((v == XFS_EXT_NORM) || (v == XFS_EXT_UNWRITTEN));
+       extent_flag = (v == XFS_EXT_NORM) ? 0 : 1;
+       ASSERT((o & XFS_MASK64HI(64-BMBT_STARTOFF_BITLEN)) == 0);
+       ASSERT((c & XFS_MASK64HI(64-BMBT_BLOCKCOUNT_BITLEN)) == 0);
+#if XFS_BIG_FILESYSTEMS
+       ASSERT((b & XFS_MASK64HI(64-BMBT_STARTBLOCK_BITLEN)) == 0);
+#endif /* XFS_BIG_FILESYSTEMS */
+#if XFS_BIG_FILESYSTEMS
+       r->l0 = ((xfs_bmbt_rec_base_t)extent_flag << 63) |
+               ((xfs_bmbt_rec_base_t)o << 9) |
+               ((xfs_bmbt_rec_base_t)b >> 43));
+       r->l1 = ((xfs_bmbt_rec_base_t)b << 21) |
+               ((xfs_bmbt_rec_base_t)c &
+               (xfs_bmbt_rec_base_t)XFS_MASK64LO(21)));
+#else  /* !XFS_BIG_FILESYSTEMS */
+       if (ISNULLSTARTBLOCK(b)) {
+               r->l0 = ((xfs_bmbt_rec_base_t)extent_flag << 63) |
+                       ((xfs_bmbt_rec_base_t)o << 9) |
+                        (xfs_bmbt_rec_base_t)XFS_MASK64LO(9);
+               r->l1 = XFS_MASK64HI(11) |
+                         ((xfs_bmbt_rec_base_t)b << 21) |
+                         ((xfs_bmbt_rec_base_t)c &
+                          (xfs_bmbt_rec_base_t)XFS_MASK64LO(21));
+       } else {
+               r->l0 = ((xfs_bmbt_rec_base_t)extent_flag << 63) |
+                       ((xfs_bmbt_rec_base_t)o << 9);
+               r->l1 = ((xfs_bmbt_rec_base_t)b << 21) |
+                        ((xfs_bmbt_rec_base_t)c &
+                        (xfs_bmbt_rec_base_t)XFS_MASK64LO(21));
+       }
+#endif /* XFS_BIG_FILESYSTEMS */
+}
+
+#if ARCH_CONVERT != ARCH_NOCONVERT
+/*
+ * Set all the fields in a bmap extent record from the uncompressed form.
+ */
+void
+xfs_bmbt_disk_set_all(
+       xfs_bmbt_rec_t  *r,
+       xfs_bmbt_irec_t *s)
+{
+       int     extent_flag;
+
+       ASSERT((s->br_state == XFS_EXT_NORM) ||
+               (s->br_state == XFS_EXT_UNWRITTEN));
+       extent_flag = (s->br_state == XFS_EXT_NORM) ? 0 : 1;
+       ASSERT((s->br_startoff & XFS_MASK64HI(9)) == 0);
+       ASSERT((s->br_blockcount & XFS_MASK64HI(43)) == 0);
+#if XFS_BIG_FILESYSTEMS
+       ASSERT((s->br_startblock & XFS_MASK64HI(12)) == 0);
+#endif /* XFS_BIG_FILESYSTEMS */
 #if XFS_BIG_FILESYSTEMS
        INT_SET(r->l0, ARCH_CONVERT, ((xfs_bmbt_rec_base_t)extent_flag << 63) |
                  ((xfs_bmbt_rec_base_t)s->br_startoff << 9) |
@@ -2414,10 +2589,10 @@ xfs_bmbt_set_all(
 }
 
 /*
- * Set all the fields in a bmap extent record from the arguments.
+ * Set all the fields in a disk format bmap extent record from the arguments.
  */
 void
-xfs_bmbt_set_allf(
+xfs_bmbt_disk_set_allf(
        xfs_bmbt_rec_t  *r,
        xfs_fileoff_t   o,
        xfs_fsblock_t   b,
@@ -2458,6 +2633,7 @@ xfs_bmbt_set_allf(
        }
 #endif /* XFS_BIG_FILESYSTEMS */
 }
+#endif
 
 /*
  * Set the blockcount field in a bmap extent record.
@@ -2468,8 +2644,8 @@ xfs_bmbt_set_blockcount(
        xfs_filblks_t   v)
 {
        ASSERT((v & XFS_MASK64HI(43)) == 0);
-       INT_SET(r->l1, ARCH_CONVERT, (INT_GET(r->l1, ARCH_CONVERT) & (xfs_bmbt_rec_base_t)XFS_MASK64HI(43)) |
-                 (xfs_bmbt_rec_base_t)(v & XFS_MASK64LO(21)));
+       r->l1 = (r->l1 & (xfs_bmbt_rec_base_t)XFS_MASK64HI(43)) |
+                 (xfs_bmbt_rec_base_t)(v & XFS_MASK64LO(21));
 }
 
 /*
@@ -2484,20 +2660,20 @@ xfs_bmbt_set_startblock(
        ASSERT((v & XFS_MASK64HI(12)) == 0);
 #endif /* XFS_BIG_FILESYSTEMS */
 #if XFS_BIG_FILESYSTEMS
-       INT_SET(r->l0, ARCH_CONVERT, (INT_GET(r->l0, ARCH_CONVERT) & (xfs_bmbt_rec_base_t)XFS_MASK64HI(55)) |
-                 (xfs_bmbt_rec_base_t)(v >> 43));
-       INT_SET(r->l1, ARCH_CONVERT, (INT_GET(r->l1, ARCH_CONVERT) & (xfs_bmbt_rec_base_t)XFS_MASK64LO(21)) |
-                 (xfs_bmbt_rec_base_t)(v << 21));
+       r->l0 = (r->l0 & (xfs_bmbt_rec_base_t)XFS_MASK64HI(55)) |
+                 (xfs_bmbt_rec_base_t)(v >> 43);
+       r->l1 = (r->l1 & (xfs_bmbt_rec_base_t)XFS_MASK64LO(21)) |
+                 (xfs_bmbt_rec_base_t)(v << 21);
 #else  /* !XFS_BIG_FILESYSTEMS */
        if (ISNULLSTARTBLOCK(v)) {
-               INT_SET(r->l0, ARCH_CONVERT, (INT_GET(r->l0, ARCH_CONVERT) | (xfs_bmbt_rec_base_t)XFS_MASK64LO(9)));
-               INT_SET(r->l1, ARCH_CONVERT, (xfs_bmbt_rec_base_t)XFS_MASK64HI(11) |
+               r->l0 |= (xfs_bmbt_rec_base_t)XFS_MASK64LO(9);
+               r->l1 = (xfs_bmbt_rec_base_t)XFS_MASK64HI(11) |
                          ((xfs_bmbt_rec_base_t)v << 21) |
-                         (INT_GET(r->l1, ARCH_CONVERT) & (xfs_bmbt_rec_base_t)XFS_MASK64LO(21)));
+                         (r->l1 & (xfs_bmbt_rec_base_t)XFS_MASK64LO(21));
        } else {
-               INT_SET(r->l0, ARCH_CONVERT, (INT_GET(r->l0, ARCH_CONVERT) & ~(xfs_bmbt_rec_base_t)XFS_MASK64LO(9)));
-               INT_SET(r->l1, ARCH_CONVERT, ((xfs_bmbt_rec_base_t)v << 21) |
-                         (INT_GET(r->l1, ARCH_CONVERT) & (xfs_bmbt_rec_base_t)XFS_MASK64LO(21)));
+               r->l0 &= ~(xfs_bmbt_rec_base_t)XFS_MASK64LO(9);
+               r->l1 = ((xfs_bmbt_rec_base_t)v << 21) |
+                         (r->l1 & (xfs_bmbt_rec_base_t)XFS_MASK64LO(21));
        }
 #endif /* XFS_BIG_FILESYSTEMS */
 }
@@ -2511,9 +2687,9 @@ xfs_bmbt_set_startoff(
        xfs_fileoff_t   v)
 {
        ASSERT((v & XFS_MASK64HI(9)) == 0);
-       INT_SET(r->l0, ARCH_CONVERT, (INT_GET(r->l0, ARCH_CONVERT) & (xfs_bmbt_rec_base_t) XFS_MASK64HI(1)) |
+       r->l0 = (r->l0 & (xfs_bmbt_rec_base_t) XFS_MASK64HI(1)) |
                ((xfs_bmbt_rec_base_t)v << 9) |
-                 (INT_GET(r->l0, ARCH_CONVERT) & (xfs_bmbt_rec_base_t)XFS_MASK64LO(9)));
+                 (r->l0 & (xfs_bmbt_rec_base_t)XFS_MASK64LO(9));
 }
 
 /*
@@ -2526,9 +2702,9 @@ xfs_bmbt_set_state(
 {
        ASSERT(v == XFS_EXT_NORM || v == XFS_EXT_UNWRITTEN);
        if (v == XFS_EXT_NORM)
-               INT_SET(r->l0, ARCH_CONVERT, INT_GET(r->l0, ARCH_CONVERT) & XFS_MASK64LO(64 - BMBT_EXNTFLAG_BITLEN));
+               r->l0 &= XFS_MASK64LO(64 - BMBT_EXNTFLAG_BITLEN);
        else
-               INT_SET(r->l0, ARCH_CONVERT, INT_GET(r->l0, ARCH_CONVERT) | XFS_MASK64HI(BMBT_EXNTFLAG_BITLEN));
+               r->l0 |= XFS_MASK64HI(BMBT_EXNTFLAG_BITLEN);
 }
 
 /*
@@ -2596,7 +2772,7 @@ xfs_bmbt_update(
 #endif
        ptr = cur->bc_ptrs[0];
        rp = XFS_BMAP_REC_IADDR(block, ptr, cur);
-       xfs_bmbt_set_allf(rp, off, bno, len, state);
+       xfs_bmbt_disk_set_allf(rp, off, bno, len, state);
        xfs_bmbt_log_recs(cur, bp, ptr, ptr);
        if (ptr > 1) {
                XFS_BMBT_TRACE_CURSOR(cur, EXIT);
@@ -2618,14 +2794,17 @@ xfs_bmbt_update(
  * Return an error condition (1) if any flags found,
  * otherwise return 0.
  */
+
 int
 xfs_check_nostate_extents(
        xfs_bmbt_rec_t          *ep,
        xfs_extnum_t            num)
 {
        for (; num > 0; num--, ep++) {
-               if (((INT_GET(ep->l0, ARCH_CONVERT)) >>
+               if ((ep->l0 >>
                     (64 - BMBT_EXNTFLAG_BITLEN)) != 0) {
+                       printk("Extent at 0x%p value 0x%llx\n", ep,
+                               (ep->l0 >> (64 - BMBT_EXNTFLAG_BITLEN)));
                        ASSERT(0);
                        return 1;
                }
index a9ec9c58252d20a79ce385f61274153e49e4841a..8aeefd43c967c8f235c499f5d0ec42de4725b3e8 100644 (file)
@@ -509,6 +509,41 @@ xfs_exntst_t
 xfs_bmbt_get_state(
        xfs_bmbt_rec_t  *r);
 
+#if ARCH_CONVERT != ARCH_NOCONVERT
+void
+xfs_bmbt_disk_get_all(
+       xfs_bmbt_rec_t  *r,
+       xfs_bmbt_irec_t *s);
+
+xfs_exntst_t
+xfs_bmbt_disk_get_state(
+       xfs_bmbt_rec_t  *r);
+
+xfs_filblks_t
+xfs_bmbt_disk_get_blockcount(
+       xfs_bmbt_rec_t  *r);
+
+xfs_fsblock_t
+xfs_bmbt_disk_get_startblock(
+       xfs_bmbt_rec_t  *r);
+
+xfs_fileoff_t
+xfs_bmbt_disk_get_startoff(
+       xfs_bmbt_rec_t  *r);
+
+#else
+#define xfs_bmbt_disk_get_all(r, s) \
+       xfs_bmbt_get_all(r, s)
+#define xfs_bmbt_disk_get_state(r) \
+       xfs_bmbt_get_state(r)
+#define xfs_bmbt_disk_get_blockcount(r) \
+       xfs_bmbt_get_blockcount(r)
+#define xfs_bmbt_disk_get_startblock(r) \
+       xfs_bmbt_get_blockcount(r)
+#define xfs_bmbt_disk_get_startoff(r) \
+       xfs_bmbt_get_startoff(r)
+#endif
+
 int
 xfs_bmbt_increment(
        struct xfs_btree_cur *,
@@ -607,6 +642,26 @@ xfs_bmbt_set_state(
        xfs_bmbt_rec_t  *r,
        xfs_exntst_t    v);
 
+#if ARCH_CONVERT != ARCH_NOCONVERT
+void
+xfs_bmbt_disk_set_all(
+       xfs_bmbt_rec_t  *r,
+       xfs_bmbt_irec_t *s);
+
+void
+xfs_bmbt_disk_set_allf(
+       xfs_bmbt_rec_t  *r,
+       xfs_fileoff_t   o,
+       xfs_fsblock_t   b,
+       xfs_filblks_t   c,
+       xfs_exntst_t    v);
+#else
+#define xfs_bmbt_disk_set_all(r, s) \
+       xfs_bmbt_set_all(r, s)
+#define xfs_bmbt_disk_set_allf(r, 0, b, c, v) \
+       xfs_bmbt_set_allf(r, 0, b, c, v)
+#endif
+
 void
 xfs_bmbt_to_bmdr(
        xfs_bmbt_block_t *,
index 7dcef68fb253a3601e8bf3f6604618f68a4c76c0..115b05df35ba451f17109ed01e0c87263a688b24 100644 (file)
@@ -261,9 +261,9 @@ xfs_btree_check_rec(
 
                r1 = ar1;
                r2 = ar2;
-               ASSERT(xfs_bmbt_get_startoff(r1) +
-                      xfs_bmbt_get_blockcount(r1) <=
-                      xfs_bmbt_get_startoff(r2));
+               ASSERT(xfs_bmbt_disk_get_startoff(r1) +
+                      xfs_bmbt_disk_get_blockcount(r1) <=
+                      xfs_bmbt_disk_get_startoff(r2));
                break;
            }
        case XFS_BTNUM_INO: {
index 5f14333dbaff7c9c231e63cc95a6140795c77a1b..0ee8eee147563d97bf60a035a1ebdd8a1f99ea49 100644 (file)
@@ -56,8 +56,9 @@ STATIC int xfs_iformat_btree(xfs_inode_t *, xfs_dinode_t *, int);
  */
 STATIC void
 xfs_validate_extents(
-       xfs_bmbt_rec_32_t       *ep,
+       xfs_bmbt_rec_t          *ep,
        int                     nrecs,
+       int                     disk,
        xfs_exntfmt_t           fmt)
 {
        xfs_bmbt_irec_t         irec;
@@ -66,14 +67,17 @@ xfs_validate_extents(
 
        for (i = 0; i < nrecs; i++) {
                memcpy(&rec, ep, sizeof(rec));
-               xfs_bmbt_get_all(&rec, &irec);
+               if (disk)
+                       xfs_bmbt_disk_get_all(&rec, &irec);
+               else
+                       xfs_bmbt_get_all(&rec, &irec);
                if (fmt == XFS_EXTFMT_NOSTATE)
                        ASSERT(irec.br_state == XFS_EXT_NORM);
                ep++;
        }
 }
 #else /* DEBUG */
-#define xfs_validate_extents(ep, nrecs, fmt)
+#define xfs_validate_extents(ep, nrecs, disk, fmt)
 #endif /* DEBUG */
 
 /*
@@ -598,9 +602,10 @@ xfs_iformat_extents(
        int             whichfork)
 {
        xfs_ifork_t     *ifp;
-       int             nex;
+       int             nex, i;
        int             real_size;
        int             size;
+       xfs_bmbt_rec_t  *ep, *dp;
 
        ifp = XFS_IFORK_PTR(ip, whichfork);
        nex = XFS_DFORK_NEXTENTS_ARCH(dip, whichfork, ARCH_CONVERT);
@@ -633,10 +638,18 @@ xfs_iformat_extents(
        ifp->if_real_bytes = real_size;
        if (size) {
                xfs_validate_extents(
-                       (xfs_bmbt_rec_32_t *)XFS_DFORK_PTR_ARCH(dip, whichfork, ARCH_CONVERT),
-                       nex, XFS_EXTFMT_INODE(ip));
-               memcpy(ifp->if_u1.if_extents,
-                       XFS_DFORK_PTR_ARCH(dip, whichfork, ARCH_CONVERT), size);
+                       (xfs_bmbt_rec_t *)XFS_DFORK_PTR_ARCH(dip, whichfork, ARCH_CONVERT),
+                       nex, 1, XFS_EXTFMT_INODE(ip));
+               dp = (xfs_bmbt_rec_t *)XFS_DFORK_PTR_ARCH(dip, whichfork, ARCH_CONVERT);
+               ep = ifp->if_u1.if_extents;
+#if ARCH_CONVERT != ARCH_NOCONVERT
+               for (i = 0; i < nex; i++, ep++, dp++) {
+                       ep->l0 = INT_GET(dp->l0, ARCH_CONVERT);
+                       ep->l1 = INT_GET(dp->l1, ARCH_CONVERT);
+               }
+#else
+               memcpy(ep, dp, size);
+#endif
                xfs_bmap_trace_exlist("xfs_iformat_extents", ip, nex,
                        whichfork);
                if (whichfork != XFS_DATA_FORK ||
@@ -979,8 +992,8 @@ xfs_iread_extents(
                ifp->if_flags &= ~XFS_IFEXTENTS;
                return error;
        }
-       xfs_validate_extents((xfs_bmbt_rec_32_t *)ifp->if_u1.if_extents,
-               XFS_IFORK_NEXTENTS(ip, whichfork), XFS_EXTFMT_INODE(ip));
+       xfs_validate_extents((xfs_bmbt_rec_t *)ifp->if_u1.if_extents,
+               XFS_IFORK_NEXTENTS(ip, whichfork), 0, XFS_EXTFMT_INODE(ip));
        return 0;
 }
 
@@ -2617,11 +2630,11 @@ xfs_iunpin_wait(
 int
 xfs_iextents_copy(
        xfs_inode_t             *ip,
-       xfs_bmbt_rec_32_t       *buffer,
+       xfs_bmbt_rec_t          *buffer,
        int                     whichfork)
 {
        int                     copied;
-       xfs_bmbt_rec_32_t       *dest_ep;
+       xfs_bmbt_rec_t          *dest_ep;
        xfs_bmbt_rec_t          *ep;
 #ifdef XFS_BMAP_TRACE
        static char             fname[] = "xfs_iextents_copy";
@@ -2638,28 +2651,13 @@ xfs_iextents_copy(
        nrecs = ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t);
        xfs_bmap_trace_exlist(fname, ip, nrecs, whichfork);
        ASSERT(nrecs > 0);
-       if (nrecs == XFS_IFORK_NEXTENTS(ip, whichfork)) {
-               /*
-                * There are no delayed allocation extents,
-                * so just copy everything.
-                */
-               ASSERT(ifp->if_bytes <= XFS_IFORK_SIZE(ip, whichfork));
-               ASSERT(ifp->if_bytes ==
-                      (XFS_IFORK_NEXTENTS(ip, whichfork) *
-                       (uint)sizeof(xfs_bmbt_rec_t)));
-               memcpy(buffer, ifp->if_u1.if_extents, ifp->if_bytes);
-               xfs_validate_extents(buffer, nrecs, XFS_EXTFMT_INODE(ip));
-               return ifp->if_bytes;
-       }
 
-       ASSERT(whichfork == XFS_DATA_FORK);
        /*
         * There are some delayed allocation extents in the
         * inode, so copy the extents one at a time and skip
         * the delayed ones.  There must be at least one
         * non-delayed extent.
         */
-       ASSERT(nrecs > ip->i_d.di_nextents);
        ep = ifp->if_u1.if_extents;
        dest_ep = buffer;
        copied = 0;
@@ -2673,15 +2671,19 @@ xfs_iextents_copy(
                        continue;
                }
 
-               *dest_ep = *(xfs_bmbt_rec_32_t *)ep;
+#if ARCH_CONVERT != ARCH_NOCONVERT
+               /* Translate to on disk format */
+               dest_ep->l0 = INT_GET(ep->l0, ARCH_CONVERT);
+               dest_ep->l1 = INT_GET(ep->l1, ARCH_CONVERT);
+#else
+               *dest_ep = *ep;
+#endif
                dest_ep++;
                ep++;
                copied++;
        }
        ASSERT(copied != 0);
-       ASSERT(copied == ip->i_d.di_nextents);
-       ASSERT((copied * (uint)sizeof(xfs_bmbt_rec_t)) <= XFS_IFORK_DSIZE(ip));
-       xfs_validate_extents(buffer, copied, XFS_EXTFMT_INODE(ip));
+       xfs_validate_extents(buffer, copied, 1, XFS_EXTFMT_INODE(ip));
 
        return (copied * (uint)sizeof(xfs_bmbt_rec_t));
 }
@@ -2754,7 +2756,7 @@ xfs_iflush_fork(
                if ((iip->ili_format.ilf_fields & extflag[whichfork]) &&
                    (ifp->if_bytes > 0)) {
                        ASSERT(XFS_IFORK_NEXTENTS(ip, whichfork) > 0);
-                       (void)xfs_iextents_copy(ip, (xfs_bmbt_rec_32_t *)cp,
+                       (void)xfs_iextents_copy(ip, (xfs_bmbt_rec_t *)cp,
                                whichfork);
                }
                break;
index ea739492d91e131d7acac432c7ab4acbebd40767..38669ac946f0cc2d03057ee90def5da0241cb22c 100644 (file)
@@ -520,7 +520,7 @@ void                xfs_iext_realloc(xfs_inode_t *, int, int);
 void           xfs_iroot_realloc(xfs_inode_t *, int, int);
 void           xfs_ipin(xfs_inode_t *);
 void           xfs_iunpin(xfs_inode_t *);
-int            xfs_iextents_copy(xfs_inode_t *, xfs_bmbt_rec_32_t *, int);
+int            xfs_iextents_copy(xfs_inode_t *, xfs_bmbt_rec_t *, int);
 int            xfs_iflush(xfs_inode_t *, uint);
 int            xfs_iflush_all(struct xfs_mount *, int);
 int            xfs_ibusy_check(xfs_inode_t *, int);
index 234ef996a8f5865af034f7eba03970dc46916a44..d23d596d79739df7f0cd04edc8e0a609869471a4 100644 (file)
@@ -214,7 +214,7 @@ xfs_inode_item_format(
        xfs_log_iovec_t         *vecp;
        xfs_inode_t             *ip;
        size_t                  data_bytes;
-       xfs_bmbt_rec_32_t       *ext_buffer;
+       xfs_bmbt_rec_t          *ext_buffer;
        int                     nrecs;
        xfs_mount_t             *mp;
 
@@ -314,6 +314,7 @@ xfs_inode_item_format(
                        nrecs = ip->i_df.if_bytes /
                                (uint)sizeof(xfs_bmbt_rec_t);
                        ASSERT(nrecs > 0);
+#if ARCH_CONVERT == ARCH_NOCONVERT
                        if (nrecs == ip->i_d.di_nextents) {
                                /*
                                 * There are no delayed allocation
@@ -323,10 +324,14 @@ xfs_inode_item_format(
                                vecp->i_addr =
                                        (char *)(ip->i_df.if_u1.if_extents);
                                vecp->i_len = ip->i_df.if_bytes;
-                       } else {
+                       } else 
+#endif
+                       {
                                /*
                                 * There are delayed allocation extents
-                                * in the inode.  Use xfs_iextents_copy()
+                                * in the inode, or we need to convert
+                                * the extents to on disk format.
+                                * Use xfs_iextents_copy()
                                 * to copy only the real extents into
                                 * a separate buffer.  We'll free the
                                 * buffer in the unlock routine.
@@ -336,7 +341,7 @@ xfs_inode_item_format(
                                iip->ili_extents_buf = ext_buffer;
                                vecp->i_addr = (xfs_caddr_t)ext_buffer;
                                vecp->i_len = xfs_iextents_copy(ip, ext_buffer,
-                                       XFS_DATA_FORK);
+                                               XFS_DATA_FORK);
                        }
                        ASSERT(vecp->i_len <= ip->i_df.if_bytes);
                        iip->ili_format.ilf_dsize = vecp->i_len;
@@ -428,6 +433,7 @@ xfs_inode_item_format(
                ASSERT(!(iip->ili_format.ilf_fields &
                         (XFS_ILOG_ADATA | XFS_ILOG_ABROOT)));
                if (iip->ili_format.ilf_fields & XFS_ILOG_AEXT) {
+                       ASSERT(!(iip->ili_format.ilf_fields & XFS_ILOG_DEXT));
                        ASSERT(ip->i_afp->if_bytes > 0);
                        ASSERT(ip->i_afp->if_u1.if_extents != NULL);
                        ASSERT(ip->i_d.di_anextents > 0);
@@ -437,12 +443,25 @@ xfs_inode_item_format(
 #endif
                        ASSERT(nrecs > 0);
                        ASSERT(nrecs == ip->i_d.di_anextents);
+#if ARCH_CONVERT == ARCH_NOCONVERT
                        /*
                         * There are not delayed allocation extents
                         * for attributes, so just point at the array.
                         */
                        vecp->i_addr = (char *)(ip->i_afp->if_u1.if_extents);
                        vecp->i_len = ip->i_afp->if_bytes;
+#else          
+                       ASSERT(iip->ili_aextents_buf == NULL);
+                       /*
+                        * Need to endian flip before logging
+                        */
+                       ext_buffer = kmem_alloc(ip->i_df.if_bytes,
+                               KM_SLEEP);
+                       iip->ili_aextents_buf = ext_buffer;
+                       vecp->i_addr = (xfs_caddr_t)ext_buffer;
+                       vecp->i_len = xfs_iextents_copy(ip, ext_buffer,
+                                       XFS_ATTR_FORK);
+#endif
                        iip->ili_format.ilf_asize = vecp->i_len;
                        vecp++;
                        nvecs++;
@@ -630,7 +649,6 @@ xfs_inode_item_unlock(
         * If the inode needed a separate buffer with which to log
         * its extents, then free it now.
         */
-       /* FIXME */
        if (iip->ili_extents_buf != NULL) {
                ASSERT(ip->i_d.di_format == XFS_DINODE_FMT_EXTENTS);
                ASSERT(ip->i_d.di_nextents > 0);
@@ -639,6 +657,14 @@ xfs_inode_item_unlock(
                kmem_free(iip->ili_extents_buf, ip->i_df.if_bytes);
                iip->ili_extents_buf = NULL;
        }
+       if (iip->ili_aextents_buf != NULL) {
+               ASSERT(ip->i_d.di_aformat == XFS_DINODE_FMT_EXTENTS);
+               ASSERT(ip->i_d.di_anextents > 0);
+               ASSERT(iip->ili_format.ilf_fields & XFS_ILOG_AEXT);
+               ASSERT(ip->i_afp->if_bytes > 0);
+               kmem_free(iip->ili_aextents_buf, ip->i_afp->if_bytes);
+               iip->ili_aextents_buf = NULL;
+       }
 
        /*
         * Figure out if we should unlock the inode or not.
index d90407088842e7af36a3f102e65ff5741caf6b79..4970205a5e69328a3fc170fc9ba67904aaeadae8 100644 (file)
@@ -141,7 +141,10 @@ typedef struct xfs_inode_log_item {
        unsigned short          ili_flags;         /* misc flags */
        unsigned short          ili_logged;        /* flushed logged data */
        unsigned int            ili_last_fields;   /* fields when flushed */
-       struct xfs_bmbt_rec_32  *ili_extents_buf;  /* array of logged exts */
+       struct xfs_bmbt_rec_32  *ili_extents_buf;  /* array of logged
+                                                     data exts */
+       struct xfs_bmbt_rec_32  *ili_aextents_buf; /* array of logged
+                                                     attr exts */
        unsigned int            ili_pushbuf_flag;  /* one bit used in push_ail */
 
 #ifdef DEBUG
index 5c70b8a77c7e01e5b5ebe189a9835d8ed1c03da9..b762d38129546c3c59f9d3ca95d8e4af9949e424 100644 (file)
@@ -2364,7 +2364,7 @@ xfs_btbmap(xfs_bmbt_block_t *bt, int bsz)
                        r = (xfs_bmbt_rec_t *)XFS_BTREE_REC_ADDR(bsz,
                                xfs_bmbt, bt, i, 0);
 
-                       xfs_bmbt_get_all((xfs_bmbt_rec_t *)r, &irec);
+                       xfs_bmbt_disk_get_all((xfs_bmbt_rec_t *)r, &irec);
                        kdb_printf("rec %d startoff %Ld startblock %Lx blockcount %Ld flag %d\n",
                                i, irec.br_startoff,
                                (__uint64_t)irec.br_startblock,