ASSERT(XFS_DIR_IS_V2(mp));
                dead_leaf2 = (xfs_dir2_leaf_t *)dead_info;
                dead_level = 0;
-               dead_hash = INT_GET(dead_leaf2->ents[be16_to_cpu(dead_leaf2->hdr.count) - 1].hashval, ARCH_CONVERT);
+               dead_hash = be32_to_cpu(dead_leaf2->ents[be16_to_cpu(dead_leaf2->hdr.count) - 1].hashval);
        } else {
                ASSERT(INT_GET(dead_info->magic, ARCH_CONVERT) == XFS_DA_NODE_MAGIC);
                dead_node = (xfs_da_intnode_t *)dead_info;
 
                        highstale = lfloghigh = -1;
                     fromidx >= 0;
                     fromidx--) {
-                       if (INT_GET(blp[fromidx].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR) {
+                       if (be32_to_cpu(blp[fromidx].address) == XFS_DIR2_NULL_DATAPTR) {
                                if (highstale == -1)
                                        highstale = toidx;
                                else {
         */
        for (low = 0, high = be32_to_cpu(btp->count) - 1; low <= high; ) {
                mid = (low + high) >> 1;
-               if ((hash = INT_GET(blp[mid].hashval, ARCH_CONVERT)) == args->hashval)
+               if ((hash = be32_to_cpu(blp[mid].hashval)) == args->hashval)
                        break;
                if (hash < args->hashval)
                        low = mid + 1;
                else
                        high = mid - 1;
        }
-       while (mid >= 0 && INT_GET(blp[mid].hashval, ARCH_CONVERT) >= args->hashval) {
+       while (mid >= 0 && be32_to_cpu(blp[mid].hashval) >= args->hashval) {
                mid--;
        }
        /*
        else {
                for (lowstale = mid;
                     lowstale >= 0 &&
-                       INT_GET(blp[lowstale].address, ARCH_CONVERT) != XFS_DIR2_NULL_DATAPTR;
+                       be32_to_cpu(blp[lowstale].address) != XFS_DIR2_NULL_DATAPTR;
                     lowstale--)
                        continue;
                for (highstale = mid + 1;
                     highstale < be32_to_cpu(btp->count) &&
-                       INT_GET(blp[highstale].address, ARCH_CONVERT) != XFS_DIR2_NULL_DATAPTR &&
+                       be32_to_cpu(blp[highstale].address) != XFS_DIR2_NULL_DATAPTR &&
                        (lowstale < 0 || mid - lowstale > highstale - mid);
                     highstale++)
                        continue;
        /*
         * Fill in the leaf entry.
         */
-       INT_SET(blp[mid].hashval, ARCH_CONVERT, args->hashval);
-       INT_SET(blp[mid].address, ARCH_CONVERT, XFS_DIR2_BYTE_TO_DATAPTR(mp, (char *)dep - (char *)block));
+       blp[mid].hashval = cpu_to_be32(args->hashval);
+       blp[mid].address = cpu_to_be32(XFS_DIR2_BYTE_TO_DATAPTR(mp,
+                               (char *)dep - (char *)block));
        xfs_dir2_block_log_leaf(tp, bp, lfloglow, lfloghigh);
        /*
         * Mark space for the data entry used.
         * Get the offset from the leaf entry, to point to the data.
         */
        dep = (xfs_dir2_data_entry_t *)
-             ((char *)block + XFS_DIR2_DATAPTR_TO_OFF(mp, INT_GET(blp[ent].address, ARCH_CONVERT)));
+             ((char *)block + XFS_DIR2_DATAPTR_TO_OFF(mp, be32_to_cpu(blp[ent].address)));
        /*
         * Fill in inode number, release the block.
         */
        for (low = 0, high = be32_to_cpu(btp->count) - 1; ; ) {
                ASSERT(low <= high);
                mid = (low + high) >> 1;
-               if ((hash = INT_GET(blp[mid].hashval, ARCH_CONVERT)) == args->hashval)
+               if ((hash = be32_to_cpu(blp[mid].hashval)) == args->hashval)
                        break;
                if (hash < args->hashval)
                        low = mid + 1;
        /*
         * Back up to the first one with the right hash value.
         */
-       while (mid > 0 && INT_GET(blp[mid - 1].hashval, ARCH_CONVERT) == args->hashval) {
+       while (mid > 0 && be32_to_cpu(blp[mid - 1].hashval) == args->hashval) {
                mid--;
        }
        /*
         * right hash value looking for our name.
         */
        do {
-               if ((addr = INT_GET(blp[mid].address, ARCH_CONVERT)) == XFS_DIR2_NULL_DATAPTR)
+               if ((addr = be32_to_cpu(blp[mid].address)) == XFS_DIR2_NULL_DATAPTR)
                        continue;
                /*
                 * Get pointer to the entry from the leaf.
                        *entno = mid;
                        return 0;
                }
-       } while (++mid < be32_to_cpu(btp->count) && INT_GET(blp[mid].hashval, ARCH_CONVERT) == hash);
+       } while (++mid < be32_to_cpu(btp->count) && be32_to_cpu(blp[mid].hashval) == hash);
        /*
         * No match, release the buffer and return ENOENT.
         */
         * Point to the data entry using the leaf entry.
         */
        dep = (xfs_dir2_data_entry_t *)
-             ((char *)block + XFS_DIR2_DATAPTR_TO_OFF(mp, INT_GET(blp[ent].address, ARCH_CONVERT)));
+             ((char *)block + XFS_DIR2_DATAPTR_TO_OFF(mp, be32_to_cpu(blp[ent].address)));
        /*
         * Mark the data entry's space free.
         */
        /*
         * Remove the leaf entry by marking it stale.
         */
-       INT_SET(blp[ent].address, ARCH_CONVERT, XFS_DIR2_NULL_DATAPTR);
+       blp[ent].address = cpu_to_be32(XFS_DIR2_NULL_DATAPTR);
        xfs_dir2_block_log_leaf(tp, bp, ent, ent);
        /*
         * Fix up bestfree, log the header if necessary.
         * Point to the data entry we need to change.
         */
        dep = (xfs_dir2_data_entry_t *)
-             ((char *)block + XFS_DIR2_DATAPTR_TO_OFF(mp, INT_GET(blp[ent].address, ARCH_CONVERT)));
+             ((char *)block + XFS_DIR2_DATAPTR_TO_OFF(mp, be32_to_cpu(blp[ent].address)));
        ASSERT(INT_GET(dep->inumber, ARCH_CONVERT) != args->inumber);
        /*
         * Change the inode number to the new value.
 
        la = a;
        lb = b;
-       return INT_GET(la->hashval, ARCH_CONVERT) < INT_GET(lb->hashval, ARCH_CONVERT) ? -1 :
-               (INT_GET(la->hashval, ARCH_CONVERT) > INT_GET(lb->hashval, ARCH_CONVERT) ? 1 : 0);
+       return be32_to_cpu(la->hashval) < be32_to_cpu(lb->hashval) ? -1 :
+               (be32_to_cpu(la->hashval) > be32_to_cpu(lb->hashval) ? 1 : 0);
 }
 
 /*
         */
        lep = XFS_DIR2_BLOCK_LEAF_P(btp);
        for (from = to = 0; from < be16_to_cpu(leaf->hdr.count); from++) {
-               if (INT_GET(leaf->ents[from].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR)
+               if (be32_to_cpu(leaf->ents[from].address) == XFS_DIR2_NULL_DATAPTR)
                        continue;
                lep[to++] = leaf->ents[from];
        }
        tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep);
        INT_SET(*tagp, ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)dep - (char *)block));
        xfs_dir2_data_log_entry(tp, bp, dep);
-       INT_SET(blp[0].hashval, ARCH_CONVERT, xfs_dir_hash_dot);
-       INT_SET(blp[0].address, ARCH_CONVERT, XFS_DIR2_BYTE_TO_DATAPTR(mp, (char *)dep - (char *)block));
+       blp[0].hashval = cpu_to_be32(xfs_dir_hash_dot);
+       blp[0].address = cpu_to_be32(XFS_DIR2_BYTE_TO_DATAPTR(mp,
+                               (char *)dep - (char *)block));
        /*
         * Create entry for ..
         */
        tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep);
        INT_SET(*tagp, ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)dep - (char *)block));
        xfs_dir2_data_log_entry(tp, bp, dep);
-       INT_SET(blp[1].hashval, ARCH_CONVERT, xfs_dir_hash_dotdot);
-       INT_SET(blp[1].address, ARCH_CONVERT, XFS_DIR2_BYTE_TO_DATAPTR(mp, (char *)dep - (char *)block));
+       blp[1].hashval = cpu_to_be32(xfs_dir_hash_dotdot);
+       blp[1].address = cpu_to_be32(XFS_DIR2_BYTE_TO_DATAPTR(mp,
+                               (char *)dep - (char *)block));
        offset = XFS_DIR2_DATA_FIRST_OFFSET;
        /*
         * Loop over existing entries, stuff them in.
                tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep);
                INT_SET(*tagp, ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)dep - (char *)block));
                xfs_dir2_data_log_entry(tp, bp, dep);
-               INT_SET(blp[2 + i].hashval, ARCH_CONVERT, xfs_da_hashname((char *)sfep->name, sfep->namelen));
-               INT_SET(blp[2 + i].address, ARCH_CONVERT, XFS_DIR2_BYTE_TO_DATAPTR(mp,
+               blp[2 + i].hashval = cpu_to_be32(xfs_da_hashname(
+                                       (char *)sfep->name, sfep->namelen));
+               blp[2 + i].address = cpu_to_be32(XFS_DIR2_BYTE_TO_DATAPTR(mp,
                                                 (char *)dep - (char *)block));
                offset = (int)((char *)(tagp + 1) - (char *)block);
                if (++i == INT_GET(sfp->hdr.count, ARCH_CONVERT))
 
                                ((char *)dep - (char *)d));
                        hash = xfs_da_hashname((char *)dep->name, dep->namelen);
                        for (i = 0; i < be32_to_cpu(btp->count); i++) {
-                               if (INT_GET(lep[i].address, ARCH_CONVERT) == addr &&
-                                   INT_GET(lep[i].hashval, ARCH_CONVERT) == hash)
+                               if (be32_to_cpu(lep[i].address) == addr &&
+                                   be32_to_cpu(lep[i].hashval) == hash)
                                        break;
                        }
                        ASSERT(i < be32_to_cpu(btp->count));
        ASSERT(freeseen == 7);
        if (be32_to_cpu(d->hdr.magic) == XFS_DIR2_BLOCK_MAGIC) {
                for (i = stale = 0; i < be32_to_cpu(btp->count); i++) {
-                       if (INT_GET(lep[i].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR)
+                       if (be32_to_cpu(lep[i].address) == XFS_DIR2_NULL_DATAPTR)
                                stale++;
                        if (i > 0)
-                               ASSERT(INT_GET(lep[i].hashval, ARCH_CONVERT) >= INT_GET(lep[i - 1].hashval, ARCH_CONVERT));
+                               ASSERT(be32_to_cpu(lep[i].hashval) >= be32_to_cpu(lep[i - 1].hashval));
                }
                ASSERT(count == be32_to_cpu(btp->count) - be32_to_cpu(btp->stale));
                ASSERT(stale == be32_to_cpu(btp->stale));
 
         * in a data block, improving the lookup of those entries.
         */
        for (use_block = -1, lep = &leaf->ents[index];
-            index < be16_to_cpu(leaf->hdr.count) && INT_GET(lep->hashval, ARCH_CONVERT) == args->hashval;
+            index < be16_to_cpu(leaf->hdr.count) && be32_to_cpu(lep->hashval) == args->hashval;
             index++, lep++) {
-               if (INT_GET(lep->address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR)
+               if (be32_to_cpu(lep->address) == XFS_DIR2_NULL_DATAPTR)
                        continue;
-               i = XFS_DIR2_DATAPTR_TO_DB(mp, INT_GET(lep->address, ARCH_CONVERT));
+               i = XFS_DIR2_DATAPTR_TO_DB(mp, be32_to_cpu(lep->address));
                ASSERT(i < be32_to_cpu(ltp->bestcount));
                ASSERT(be16_to_cpu(bestsp[i]) != NULLDATAOFF);
                if (be16_to_cpu(bestsp[i]) >= length) {
                         */
                        for (lowstale = index - 1;
                             lowstale >= 0 &&
-                               INT_GET(leaf->ents[lowstale].address, ARCH_CONVERT) !=
+                               be32_to_cpu(leaf->ents[lowstale].address) !=
                                XFS_DIR2_NULL_DATAPTR;
                             lowstale--)
                                continue;
                         */
                        for (highstale = index;
                             highstale < be16_to_cpu(leaf->hdr.count) &&
-                               INT_GET(leaf->ents[highstale].address, ARCH_CONVERT) !=
+                               be32_to_cpu(leaf->ents[highstale].address) !=
                                XFS_DIR2_NULL_DATAPTR &&
                                (lowstale < 0 ||
                                 index - lowstale - 1 >= highstale - index);
                    (highstale == be16_to_cpu(leaf->hdr.count) ||
                     index - lowstale - 1 < highstale - index)) {
                        ASSERT(index - lowstale - 1 >= 0);
-                       ASSERT(INT_GET(leaf->ents[lowstale].address, ARCH_CONVERT) ==
+                       ASSERT(be32_to_cpu(leaf->ents[lowstale].address) ==
                               XFS_DIR2_NULL_DATAPTR);
                        /*
                         * Copy entries up to cover the stale entry
                 */
                else {
                        ASSERT(highstale - index >= 0);
-                       ASSERT(INT_GET(leaf->ents[highstale].address, ARCH_CONVERT) ==
+                       ASSERT(be32_to_cpu(leaf->ents[highstale].address) ==
                               XFS_DIR2_NULL_DATAPTR);
                        /*
                         * Copy entries down to copver the stale entry
        /*
         * Fill in the new leaf entry.
         */
-       INT_SET(lep->hashval, ARCH_CONVERT, args->hashval);
-       INT_SET(lep->address, ARCH_CONVERT, XFS_DIR2_DB_OFF_TO_DATAPTR(mp, use_block, INT_GET(*tagp, ARCH_CONVERT)));
+       lep->hashval = cpu_to_be32(args->hashval);
+       lep->address = cpu_to_be32(XFS_DIR2_DB_OFF_TO_DATAPTR(mp, use_block,
+                               INT_GET(*tagp, ARCH_CONVERT)));
        /*
         * Log the leaf fields and give up the buffers.
         */
         */
        for (i = stale = 0; i < be16_to_cpu(leaf->hdr.count); i++) {
                if (i + 1 < be16_to_cpu(leaf->hdr.count))
-                       ASSERT(INT_GET(leaf->ents[i].hashval, ARCH_CONVERT) <=
-                              INT_GET(leaf->ents[i + 1].hashval, ARCH_CONVERT));
-               if (INT_GET(leaf->ents[i].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR)
+                       ASSERT(be32_to_cpu(leaf->ents[i].hashval) <=
+                              be32_to_cpu(leaf->ents[i + 1].hashval));
+               if (be32_to_cpu(leaf->ents[i].address) == XFS_DIR2_NULL_DATAPTR)
                        stale++;
        }
        ASSERT(be16_to_cpu(leaf->hdr.stale) == stale);
         * Compress out the stale entries in place.
         */
        for (from = to = 0, loglow = -1; from < be16_to_cpu(leaf->hdr.count); from++) {
-               if (INT_GET(leaf->ents[from].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR)
+               if (be32_to_cpu(leaf->ents[from].address) == XFS_DIR2_NULL_DATAPTR)
                        continue;
                /*
                 * Only actually copy the entries that are different.
         */
        for (lowstale = index - 1;
             lowstale >= 0 &&
-               INT_GET(leaf->ents[lowstale].address, ARCH_CONVERT) != XFS_DIR2_NULL_DATAPTR;
+               be32_to_cpu(leaf->ents[lowstale].address) != XFS_DIR2_NULL_DATAPTR;
             lowstale--)
                continue;
        /*
         */
        for (highstale = index;
             highstale < be16_to_cpu(leaf->hdr.count) &&
-               INT_GET(leaf->ents[highstale].address, ARCH_CONVERT) != XFS_DIR2_NULL_DATAPTR &&
+               be32_to_cpu(leaf->ents[highstale].address) != XFS_DIR2_NULL_DATAPTR &&
                (lowstale < 0 || index - lowstale > highstale - index);
             highstale++)
                continue;
                if (index == from)
                        newindex = to;
                if (from != keepstale &&
-                   INT_GET(leaf->ents[from].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR) {
+                   be32_to_cpu(leaf->ents[from].address) == XFS_DIR2_NULL_DATAPTR) {
                        if (from == to)
                                *lowlogp = to;
                        continue;
         */
        dep = (xfs_dir2_data_entry_t *)
              ((char *)dbp->data +
-              XFS_DIR2_DATAPTR_TO_OFF(dp->i_mount, INT_GET(lep->address, ARCH_CONVERT)));
+              XFS_DIR2_DATAPTR_TO_OFF(dp->i_mount, be32_to_cpu(lep->address)));
        /*
         * Return the found inode number.
         */
         * looking to match the name.
         */
        for (lep = &leaf->ents[index], dbp = NULL, curdb = -1;
-            index < be16_to_cpu(leaf->hdr.count) && INT_GET(lep->hashval, ARCH_CONVERT) == args->hashval;
+            index < be16_to_cpu(leaf->hdr.count) && be32_to_cpu(lep->hashval) == args->hashval;
             lep++, index++) {
                /*
                 * Skip over stale leaf entries.
                 */
-               if (INT_GET(lep->address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR)
+               if (be32_to_cpu(lep->address) == XFS_DIR2_NULL_DATAPTR)
                        continue;
                /*
                 * Get the new data block number.
                 */
-               newdb = XFS_DIR2_DATAPTR_TO_DB(mp, INT_GET(lep->address, ARCH_CONVERT));
+               newdb = XFS_DIR2_DATAPTR_TO_DB(mp, be32_to_cpu(lep->address));
                /*
                 * If it's not the same as the old data block number,
                 * need to pitch the old one and read the new one.
                 */
                dep = (xfs_dir2_data_entry_t *)
                      ((char *)dbp->data +
-                      XFS_DIR2_DATAPTR_TO_OFF(mp, INT_GET(lep->address, ARCH_CONVERT)));
+                      XFS_DIR2_DATAPTR_TO_OFF(mp, be32_to_cpu(lep->address)));
                /*
                 * If it matches then return it.
                 */
         * Point to the leaf entry, use that to point to the data entry.
         */
        lep = &leaf->ents[index];
-       db = XFS_DIR2_DATAPTR_TO_DB(mp, INT_GET(lep->address, ARCH_CONVERT));
+       db = XFS_DIR2_DATAPTR_TO_DB(mp, be32_to_cpu(lep->address));
        dep = (xfs_dir2_data_entry_t *)
-             ((char *)data + XFS_DIR2_DATAPTR_TO_OFF(mp, INT_GET(lep->address, ARCH_CONVERT)));
+             ((char *)data + XFS_DIR2_DATAPTR_TO_OFF(mp, be32_to_cpu(lep->address)));
        needscan = needlog = 0;
        oldbest = be16_to_cpu(data->hdr.bestfree[0].length);
        ltp = XFS_DIR2_LEAF_TAIL_P(mp, leaf);
         */
        be16_add(&leaf->hdr.stale, 1);
        xfs_dir2_leaf_log_header(tp, lbp);
-       INT_SET(lep->address, ARCH_CONVERT, XFS_DIR2_NULL_DATAPTR);
+       lep->address = cpu_to_be32(XFS_DIR2_NULL_DATAPTR);
        xfs_dir2_leaf_log_ents(tp, lbp, index, index);
        /*
         * Scan the freespace in the data block again if necessary,
         */
        dep = (xfs_dir2_data_entry_t *)
              ((char *)dbp->data +
-              XFS_DIR2_DATAPTR_TO_OFF(dp->i_mount, INT_GET(lep->address, ARCH_CONVERT)));
+              XFS_DIR2_DATAPTR_TO_OFF(dp->i_mount, be32_to_cpu(lep->address)));
        ASSERT(args->inumber != INT_GET(dep->inumber, ARCH_CONVERT));
        /*
         * Put the new inode number in, log it.
                hashwant = args->hashval;
             low <= high; ) {
                mid = (low + high) >> 1;
-               if ((hash = INT_GET(lep[mid].hashval, ARCH_CONVERT)) == hashwant)
+               if ((hash = be32_to_cpu(lep[mid].hashval)) == hashwant)
                        break;
                if (hash < hashwant)
                        low = mid + 1;
         * Found one, back up through all the equal hash values.
         */
        if (hash == hashwant) {
-               while (mid > 0 && INT_GET(lep[mid - 1].hashval, ARCH_CONVERT) == hashwant) {
+               while (mid > 0 && be32_to_cpu(lep[mid - 1].hashval) == hashwant) {
                        mid--;
                }
        }
 
  * Leaf block entry.
  */
 typedef struct xfs_dir2_leaf_entry {
-       xfs_dahash_t            hashval;        /* hash value of name */
-       xfs_dir2_dataptr_t      address;        /* address of data entry */
+       __be32                  hashval;        /* hash value of name */
+       __be32                  address;        /* address of data entry */
 } xfs_dir2_leaf_entry_t;
 
 /*
 
                compact = be16_to_cpu(leaf->hdr.stale) > 1;
        } else
                compact = 0;
-       ASSERT(index == 0 || INT_GET(leaf->ents[index - 1].hashval, ARCH_CONVERT) <= args->hashval);
+       ASSERT(index == 0 || be32_to_cpu(leaf->ents[index - 1].hashval) <= args->hashval);
        ASSERT(index == be16_to_cpu(leaf->hdr.count) ||
-              INT_GET(leaf->ents[index].hashval, ARCH_CONVERT) >= args->hashval);
+              be32_to_cpu(leaf->ents[index].hashval) >= args->hashval);
 
        if (args->justcheck)
                return 0;
                         */
                        for (lowstale = index - 1;
                             lowstale >= 0 &&
-                               INT_GET(leaf->ents[lowstale].address, ARCH_CONVERT) !=
+                               be32_to_cpu(leaf->ents[lowstale].address) !=
                                XFS_DIR2_NULL_DATAPTR;
                             lowstale--)
                                continue;
                         */
                        for (highstale = index;
                             highstale < be16_to_cpu(leaf->hdr.count) &&
-                               INT_GET(leaf->ents[highstale].address, ARCH_CONVERT) !=
+                               be32_to_cpu(leaf->ents[highstale].address) !=
                                XFS_DIR2_NULL_DATAPTR &&
                                (lowstale < 0 ||
                                 index - lowstale - 1 >= highstale - index);
                if (lowstale >= 0 &&
                    (highstale == be16_to_cpu(leaf->hdr.count) ||
                     index - lowstale - 1 < highstale - index)) {
-                       ASSERT(INT_GET(leaf->ents[lowstale].address, ARCH_CONVERT) ==
+                       ASSERT(be32_to_cpu(leaf->ents[lowstale].address) ==
                               XFS_DIR2_NULL_DATAPTR);
                        ASSERT(index - lowstale - 1 >= 0);
                        if (index - lowstale - 1 > 0)
                 * Shift entries down toward the stale slot.
                 */
                else {
-                       ASSERT(INT_GET(leaf->ents[highstale].address, ARCH_CONVERT) ==
+                       ASSERT(be32_to_cpu(leaf->ents[highstale].address) ==
                               XFS_DIR2_NULL_DATAPTR);
                        ASSERT(highstale - index >= 0);
                        if (highstale - index > 0)
        /*
         * Insert the new entry, log everything.
         */
-       INT_SET(lep->hashval, ARCH_CONVERT, args->hashval);
-       INT_SET(lep->address, ARCH_CONVERT, XFS_DIR2_DB_OFF_TO_DATAPTR(mp, args->blkno, args->index));
+       lep->hashval = cpu_to_be32(args->hashval);
+       lep->address = cpu_to_be32(XFS_DIR2_DB_OFF_TO_DATAPTR(mp,
+                               args->blkno, args->index));
        xfs_dir2_leaf_log_header(tp, bp);
        xfs_dir2_leaf_log_ents(tp, bp, lfloglow, lfloghigh);
        xfs_dir2_leafn_check(dp, bp);
        ASSERT(be16_to_cpu(leaf->hdr.count) <= XFS_DIR2_MAX_LEAF_ENTS(mp));
        for (i = stale = 0; i < be16_to_cpu(leaf->hdr.count); i++) {
                if (i + 1 < be16_to_cpu(leaf->hdr.count)) {
-                       ASSERT(INT_GET(leaf->ents[i].hashval, ARCH_CONVERT) <=
-                              INT_GET(leaf->ents[i + 1].hashval, ARCH_CONVERT));
+                       ASSERT(be32_to_cpu(leaf->ents[i].hashval) <=
+                              be32_to_cpu(leaf->ents[i + 1].hashval));
                }
-               if (INT_GET(leaf->ents[i].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR)
+               if (be32_to_cpu(leaf->ents[i].address) == XFS_DIR2_NULL_DATAPTR)
                        stale++;
        }
        ASSERT(be16_to_cpu(leaf->hdr.stale) == stale);
                *count = be16_to_cpu(leaf->hdr.count);
        if (!leaf->hdr.count)
                return 0;
-       return INT_GET(leaf->ents[be16_to_cpu(leaf->hdr.count) - 1].hashval, ARCH_CONVERT);
+       return be32_to_cpu(leaf->ents[be16_to_cpu(leaf->hdr.count) - 1].hashval);
 }
 
 /*
         * Loop over leaf entries with the right hash value.
         */
        for (lep = &leaf->ents[index];
-            index < be16_to_cpu(leaf->hdr.count) && INT_GET(lep->hashval, ARCH_CONVERT) == args->hashval;
+            index < be16_to_cpu(leaf->hdr.count) && be32_to_cpu(lep->hashval) == args->hashval;
             lep++, index++) {
                /*
                 * Skip stale leaf entries.
                 */
-               if (INT_GET(lep->address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR)
+               if (be32_to_cpu(lep->address) == XFS_DIR2_NULL_DATAPTR)
                        continue;
                /*
                 * Pull the data block number from the entry.
                 */
-               newdb = XFS_DIR2_DATAPTR_TO_DB(mp, INT_GET(lep->address, ARCH_CONVERT));
+               newdb = XFS_DIR2_DATAPTR_TO_DB(mp, be32_to_cpu(lep->address));
                /*
                 * For addname, we're looking for a place to put the new entry.
                 * We want to use a data block with an entry of equal
                         */
                        dep = (xfs_dir2_data_entry_t *)
                              ((char *)curbp->data +
-                              XFS_DIR2_DATAPTR_TO_OFF(mp, INT_GET(lep->address, ARCH_CONVERT)));
+                              XFS_DIR2_DATAPTR_TO_OFF(mp, be32_to_cpu(lep->address)));
                        /*
                         * Compare the entry, return it if it matches.
                         */
                int     i;                      /* temp leaf index */
 
                for (i = start_s, stale = 0; i < start_s + count; i++) {
-                       if (INT_GET(leaf_s->ents[i].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR)
+                       if (be32_to_cpu(leaf_s->ents[i].address) == XFS_DIR2_NULL_DATAPTR)
                                stale++;
                }
        } else
        ASSERT(INT_GET(leaf2->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC);
        if (be16_to_cpu(leaf1->hdr.count) > 0 &&
            be16_to_cpu(leaf2->hdr.count) > 0 &&
-           (INT_GET(leaf2->ents[0].hashval, ARCH_CONVERT) < INT_GET(leaf1->ents[0].hashval, ARCH_CONVERT) ||
-            INT_GET(leaf2->ents[be16_to_cpu(leaf2->hdr.count) - 1].hashval, ARCH_CONVERT) <
-            INT_GET(leaf1->ents[be16_to_cpu(leaf1->hdr.count) - 1].hashval, ARCH_CONVERT)))
+           (be32_to_cpu(leaf2->ents[0].hashval) < be32_to_cpu(leaf1->ents[0].hashval) ||
+            be32_to_cpu(leaf2->ents[be16_to_cpu(leaf2->hdr.count) - 1].hashval) <
+            be32_to_cpu(leaf1->ents[be16_to_cpu(leaf1->hdr.count) - 1].hashval)))
                return 1;
        return 0;
 }
                xfs_dahash_t    midhash;        /* middle entry hash value */
 
                if (mid >= be16_to_cpu(leaf1->hdr.count))
-                       midhash = INT_GET(leaf2->ents[mid - be16_to_cpu(leaf1->hdr.count)].hashval, ARCH_CONVERT);
+                       midhash = be32_to_cpu(leaf2->ents[mid - be16_to_cpu(leaf1->hdr.count)].hashval);
                else
-                       midhash = INT_GET(leaf1->ents[mid].hashval, ARCH_CONVERT);
+                       midhash = be32_to_cpu(leaf1->ents[mid].hashval);
                isleft = args->hashval <= midhash;
        }
        /*
        /*
         * Extract the data block and offset from the entry.
         */
-       db = XFS_DIR2_DATAPTR_TO_DB(mp, INT_GET(lep->address, ARCH_CONVERT));
+       db = XFS_DIR2_DATAPTR_TO_DB(mp, be32_to_cpu(lep->address));
        ASSERT(dblk->blkno == db);
-       off = XFS_DIR2_DATAPTR_TO_OFF(mp, INT_GET(lep->address, ARCH_CONVERT));
+       off = XFS_DIR2_DATAPTR_TO_OFF(mp, be32_to_cpu(lep->address));
        ASSERT(dblk->index == off);
        /*
         * Kill the leaf entry by marking it stale.
         */
        be16_add(&leaf->hdr.stale, 1);
        xfs_dir2_leaf_log_header(tp, bp);
-       INT_SET(lep->address, ARCH_CONVERT, XFS_DIR2_NULL_DATAPTR);
+       lep->address = cpu_to_be32(XFS_DIR2_NULL_DATAPTR);
        xfs_dir2_leaf_log_ents(tp, bp, index, index);
        /*
         * Make the data entry free.  Keep track of the longest freespace
        /*
         * Move the entries from drop to the appropriate end of save.
         */
-       drop_blk->hashval = INT_GET(drop_leaf->ents[be16_to_cpu(drop_leaf->hdr.count) - 1].hashval, ARCH_CONVERT);
+       drop_blk->hashval = be32_to_cpu(drop_leaf->ents[be16_to_cpu(drop_leaf->hdr.count) - 1].hashval);
        if (xfs_dir2_leafn_order(save_blk->bp, drop_blk->bp))
                xfs_dir2_leafn_moveents(args, drop_blk->bp, 0, save_blk->bp, 0,
                        be16_to_cpu(drop_leaf->hdr.count));
        else
                xfs_dir2_leafn_moveents(args, drop_blk->bp, 0, save_blk->bp,
                        be16_to_cpu(save_leaf->hdr.count), be16_to_cpu(drop_leaf->hdr.count));
-       save_blk->hashval = INT_GET(save_leaf->ents[be16_to_cpu(save_leaf->hdr.count) - 1].hashval, ARCH_CONVERT);
+       save_blk->hashval = be32_to_cpu(save_leaf->ents[be16_to_cpu(save_leaf->hdr.count) - 1].hashval);
        xfs_dir2_leafn_check(args->dp, save_blk->bp);
 }
 
                ASSERT(be32_to_cpu(data->hdr.magic) == XFS_DIR2_DATA_MAGIC);
                dep = (xfs_dir2_data_entry_t *)
                      ((char *)data +
-                      XFS_DIR2_DATAPTR_TO_OFF(state->mp, INT_GET(lep->address, ARCH_CONVERT)));
+                      XFS_DIR2_DATAPTR_TO_OFF(state->mp, be32_to_cpu(lep->address)));
                ASSERT(inum != INT_GET(dep->inumber, ARCH_CONVERT));
                /*
                 * Fill in the new inode number and log the entry.
 
         * Iterate over the block's data entries by using the leaf pointers.
         */
        for (i = 0; i < be32_to_cpu(btp->count); i++) {
-               if ((addr = INT_GET(blp[i].address, ARCH_CONVERT)) == XFS_DIR2_NULL_DATAPTR)
+               if ((addr = be32_to_cpu(blp[i].address)) == XFS_DIR2_NULL_DATAPTR)
                        continue;
                /*
                 * Calculate the pointer to the entry at hand.