aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ialloc_btree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_ialloc_btree.c')
-rw-r--r--fs/xfs/xfs_ialloc_btree.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c
index 616eeeb6953e..c848141c597d 100644
--- a/fs/xfs/xfs_ialloc_btree.c
+++ b/fs/xfs/xfs_ialloc_btree.c
@@ -568,7 +568,7 @@ xfs_inobt_insrec(
568 /* 568 /*
569 * Make a key out of the record data to be inserted, and save it. 569 * Make a key out of the record data to be inserted, and save it.
570 */ 570 */
571 key.ir_startino = recp->ir_startino; /* INT_: direct copy */ 571 key.ir_startino = recp->ir_startino;
572 optr = ptr = cur->bc_ptrs[level]; 572 optr = ptr = cur->bc_ptrs[level];
573 /* 573 /*
574 * If we're off the left edge, return failure. 574 * If we're off the left edge, return failure.
@@ -641,7 +641,7 @@ xfs_inobt_insrec(
641 return error; 641 return error;
642#endif 642#endif
643 ptr = cur->bc_ptrs[level]; 643 ptr = cur->bc_ptrs[level];
644 nrec.ir_startino = nkey.ir_startino; /* INT_: direct copy */ 644 nrec.ir_startino = nkey.ir_startino;
645 } else { 645 } else {
646 /* 646 /*
647 * Otherwise the insert fails. 647 * Otherwise the insert fails.
@@ -950,12 +950,12 @@ xfs_inobt_lookup(
950 xfs_inobt_key_t *kkp; 950 xfs_inobt_key_t *kkp;
951 951
952 kkp = kkbase + keyno - 1; 952 kkp = kkbase + keyno - 1;
953 startino = INT_GET(kkp->ir_startino, ARCH_CONVERT); 953 startino = be32_to_cpu(kkp->ir_startino);
954 } else { 954 } else {
955 xfs_inobt_rec_t *krp; 955 xfs_inobt_rec_t *krp;
956 956
957 krp = krbase + keyno - 1; 957 krp = krbase + keyno - 1;
958 startino = INT_GET(krp->ir_startino, ARCH_CONVERT); 958 startino = be32_to_cpu(krp->ir_startino);
959 } 959 }
960 /* 960 /*
961 * Compute difference to get next direction. 961 * Compute difference to get next direction.
@@ -1160,7 +1160,7 @@ xfs_inobt_lshift(
1160 } else { 1160 } else {
1161 memmove(rrp, rrp + 1, be16_to_cpu(right->bb_numrecs) * sizeof(*rrp)); 1161 memmove(rrp, rrp + 1, be16_to_cpu(right->bb_numrecs) * sizeof(*rrp));
1162 xfs_inobt_log_recs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); 1162 xfs_inobt_log_recs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs));
1163 key.ir_startino = rrp->ir_startino; /* INT_: direct copy */ 1163 key.ir_startino = rrp->ir_startino;
1164 rkp = &key; 1164 rkp = &key;
1165 } 1165 }
1166 /* 1166 /*
@@ -1301,9 +1301,9 @@ xfs_inobt_newroot(
1301 kp[1] = *XFS_INOBT_KEY_ADDR(right, 1, cur); /* INT_: struct copy */ 1301 kp[1] = *XFS_INOBT_KEY_ADDR(right, 1, cur); /* INT_: struct copy */
1302 } else { 1302 } else {
1303 rp = XFS_INOBT_REC_ADDR(left, 1, cur); 1303 rp = XFS_INOBT_REC_ADDR(left, 1, cur);
1304 INT_COPY(kp[0].ir_startino, rp->ir_startino, ARCH_CONVERT); 1304 kp[0].ir_startino = rp->ir_startino;
1305 rp = XFS_INOBT_REC_ADDR(right, 1, cur); 1305 rp = XFS_INOBT_REC_ADDR(right, 1, cur);
1306 INT_COPY(kp[1].ir_startino, rp->ir_startino, ARCH_CONVERT); 1306 kp[1].ir_startino = rp->ir_startino;
1307 } 1307 }
1308 xfs_inobt_log_keys(cur, nbp, 1, 2); 1308 xfs_inobt_log_keys(cur, nbp, 1, 2);
1309 /* 1309 /*
@@ -1420,7 +1420,7 @@ xfs_inobt_rshift(
1420 memmove(rrp + 1, rrp, be16_to_cpu(right->bb_numrecs) * sizeof(*rrp)); 1420 memmove(rrp + 1, rrp, be16_to_cpu(right->bb_numrecs) * sizeof(*rrp));
1421 *rrp = *lrp; 1421 *rrp = *lrp;
1422 xfs_inobt_log_recs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs) + 1); 1422 xfs_inobt_log_recs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs) + 1);
1423 key.ir_startino = rrp->ir_startino; /* INT_: direct copy */ 1423 key.ir_startino = rrp->ir_startino;
1424 rkp = &key; 1424 rkp = &key;
1425 } 1425 }
1426 /* 1426 /*
@@ -1559,7 +1559,7 @@ xfs_inobt_split(
1559 rrp = XFS_INOBT_REC_ADDR(right, 1, cur); 1559 rrp = XFS_INOBT_REC_ADDR(right, 1, cur);
1560 memcpy(rrp, lrp, be16_to_cpu(right->bb_numrecs) * sizeof(*rrp)); 1560 memcpy(rrp, lrp, be16_to_cpu(right->bb_numrecs) * sizeof(*rrp));
1561 xfs_inobt_log_recs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); 1561 xfs_inobt_log_recs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs));
1562 keyp->ir_startino = rrp->ir_startino; /* INT_: direct copy */ 1562 keyp->ir_startino = rrp->ir_startino;
1563 } 1563 }
1564 /* 1564 /*
1565 * Find the left block number by looking in the buffer. 1565 * Find the left block number by looking in the buffer.
@@ -1813,9 +1813,9 @@ xfs_inobt_get_rec(
1813 * Point to the record and extract its data. 1813 * Point to the record and extract its data.
1814 */ 1814 */
1815 rec = XFS_INOBT_REC_ADDR(block, ptr, cur); 1815 rec = XFS_INOBT_REC_ADDR(block, ptr, cur);
1816 *ino = INT_GET(rec->ir_startino, ARCH_CONVERT); 1816 *ino = be32_to_cpu(rec->ir_startino);
1817 *fcnt = INT_GET(rec->ir_freecount, ARCH_CONVERT); 1817 *fcnt = be32_to_cpu(rec->ir_freecount);
1818 *free = INT_GET(rec->ir_free, ARCH_CONVERT); 1818 *free = be64_to_cpu(rec->ir_free);
1819 *stat = 1; 1819 *stat = 1;
1820 return 0; 1820 return 0;
1821} 1821}
@@ -1930,9 +1930,9 @@ xfs_inobt_insert(
1930 1930
1931 level = 0; 1931 level = 0;
1932 nbno = NULLAGBLOCK; 1932 nbno = NULLAGBLOCK;
1933 INT_SET(nrec.ir_startino, ARCH_CONVERT, cur->bc_rec.i.ir_startino); 1933 nrec.ir_startino = cpu_to_be32(cur->bc_rec.i.ir_startino);
1934 INT_SET(nrec.ir_freecount, ARCH_CONVERT, cur->bc_rec.i.ir_freecount); 1934 nrec.ir_freecount = cpu_to_be32(cur->bc_rec.i.ir_freecount);
1935 INT_SET(nrec.ir_free, ARCH_CONVERT, cur->bc_rec.i.ir_free); 1935 nrec.ir_free = cpu_to_be64(cur->bc_rec.i.ir_free);
1936 ncur = (xfs_btree_cur_t *)0; 1936 ncur = (xfs_btree_cur_t *)0;
1937 pcur = cur; 1937 pcur = cur;
1938 /* 1938 /*
@@ -2060,9 +2060,9 @@ xfs_inobt_update(
2060 /* 2060 /*
2061 * Fill in the new contents and log them. 2061 * Fill in the new contents and log them.
2062 */ 2062 */
2063 INT_SET(rp->ir_startino, ARCH_CONVERT, ino); 2063 rp->ir_startino = cpu_to_be32(ino);
2064 INT_SET(rp->ir_freecount, ARCH_CONVERT, fcnt); 2064 rp->ir_freecount = cpu_to_be32(fcnt);
2065 INT_SET(rp->ir_free, ARCH_CONVERT, free); 2065 rp->ir_free = cpu_to_be64(free);
2066 xfs_inobt_log_recs(cur, bp, ptr, ptr); 2066 xfs_inobt_log_recs(cur, bp, ptr, ptr);
2067 /* 2067 /*
2068 * Updating first record in leaf. Pass new key value up to our parent. 2068 * Updating first record in leaf. Pass new key value up to our parent.
@@ -2070,7 +2070,7 @@ xfs_inobt_update(
2070 if (ptr == 1) { 2070 if (ptr == 1) {
2071 xfs_inobt_key_t key; /* key containing [ino] */ 2071 xfs_inobt_key_t key; /* key containing [ino] */
2072 2072
2073 INT_SET(key.ir_startino, ARCH_CONVERT, ino); 2073 key.ir_startino = cpu_to_be32(ino);
2074 if ((error = xfs_inobt_updkey(cur, &key, 1))) 2074 if ((error = xfs_inobt_updkey(cur, &key, 1)))
2075 return error; 2075 return error;
2076 } 2076 }