aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_leaf.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-03-17 01:28:40 -0500
committerNathan Scott <nathans@sgi.com>2006-03-17 01:28:40 -0500
commit89da054424a775b4b257556eda8a300be1134d7c (patch)
treeb7a6d19ee5baaebf2794271dabaf0f59d44f9fa6 /fs/xfs/xfs_dir2_leaf.c
parent3d693c6ed7892d066e8fb3311c6b74f7699326f9 (diff)
[XFS] endianess annotations for xfs_da_blkinfo_t
SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25495a Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_dir2_leaf.c')
-rw-r--r--fs/xfs/xfs_dir2_leaf.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c
index b5036512d02f..08648b18265c 100644
--- a/fs/xfs/xfs_dir2_leaf.c
+++ b/fs/xfs/xfs_dir2_leaf.c
@@ -564,7 +564,7 @@ xfs_dir2_leaf_check(
564 564
565 leaf = bp->data; 565 leaf = bp->data;
566 mp = dp->i_mount; 566 mp = dp->i_mount;
567 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAF1_MAGIC); 567 ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR2_LEAF1_MAGIC);
568 /* 568 /*
569 * This value is not restrictive enough. 569 * This value is not restrictive enough.
570 * Should factor in the size of the bests table as well. 570 * Should factor in the size of the bests table as well.
@@ -1172,7 +1172,7 @@ xfs_dir2_leaf_init(
1172 /* 1172 /*
1173 * Initialize the header. 1173 * Initialize the header.
1174 */ 1174 */
1175 INT_SET(leaf->hdr.info.magic, ARCH_CONVERT, magic); 1175 leaf->hdr.info.magic = cpu_to_be16(magic);
1176 leaf->hdr.info.forw = 0; 1176 leaf->hdr.info.forw = 0;
1177 leaf->hdr.info.back = 0; 1177 leaf->hdr.info.back = 0;
1178 leaf->hdr.count = 0; 1178 leaf->hdr.count = 0;
@@ -1208,7 +1208,7 @@ xfs_dir2_leaf_log_bests(
1208 xfs_dir2_leaf_tail_t *ltp; /* leaf tail structure */ 1208 xfs_dir2_leaf_tail_t *ltp; /* leaf tail structure */
1209 1209
1210 leaf = bp->data; 1210 leaf = bp->data;
1211 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAF1_MAGIC); 1211 ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR2_LEAF1_MAGIC);
1212 ltp = XFS_DIR2_LEAF_TAIL_P(tp->t_mountp, leaf); 1212 ltp = XFS_DIR2_LEAF_TAIL_P(tp->t_mountp, leaf);
1213 firstb = XFS_DIR2_LEAF_BESTS_P(ltp) + first; 1213 firstb = XFS_DIR2_LEAF_BESTS_P(ltp) + first;
1214 lastb = XFS_DIR2_LEAF_BESTS_P(ltp) + last; 1214 lastb = XFS_DIR2_LEAF_BESTS_P(ltp) + last;
@@ -1231,8 +1231,8 @@ xfs_dir2_leaf_log_ents(
1231 xfs_dir2_leaf_t *leaf; /* leaf structure */ 1231 xfs_dir2_leaf_t *leaf; /* leaf structure */
1232 1232
1233 leaf = bp->data; 1233 leaf = bp->data;
1234 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAF1_MAGIC || 1234 ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR2_LEAF1_MAGIC ||
1235 INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); 1235 be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR2_LEAFN_MAGIC);
1236 firstlep = &leaf->ents[first]; 1236 firstlep = &leaf->ents[first];
1237 lastlep = &leaf->ents[last]; 1237 lastlep = &leaf->ents[last];
1238 xfs_da_log_buf(tp, bp, (uint)((char *)firstlep - (char *)leaf), 1238 xfs_da_log_buf(tp, bp, (uint)((char *)firstlep - (char *)leaf),
@@ -1250,8 +1250,8 @@ xfs_dir2_leaf_log_header(
1250 xfs_dir2_leaf_t *leaf; /* leaf structure */ 1250 xfs_dir2_leaf_t *leaf; /* leaf structure */
1251 1251
1252 leaf = bp->data; 1252 leaf = bp->data;
1253 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAF1_MAGIC || 1253 ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR2_LEAF1_MAGIC ||
1254 INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); 1254 be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR2_LEAFN_MAGIC);
1255 xfs_da_log_buf(tp, bp, (uint)((char *)&leaf->hdr - (char *)leaf), 1255 xfs_da_log_buf(tp, bp, (uint)((char *)&leaf->hdr - (char *)leaf),
1256 (uint)(sizeof(leaf->hdr) - 1)); 1256 (uint)(sizeof(leaf->hdr) - 1));
1257} 1257}
@@ -1270,7 +1270,7 @@ xfs_dir2_leaf_log_tail(
1270 1270
1271 mp = tp->t_mountp; 1271 mp = tp->t_mountp;
1272 leaf = bp->data; 1272 leaf = bp->data;
1273 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAF1_MAGIC); 1273 ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR2_LEAF1_MAGIC);
1274 ltp = XFS_DIR2_LEAF_TAIL_P(mp, leaf); 1274 ltp = XFS_DIR2_LEAF_TAIL_P(mp, leaf);
1275 xfs_da_log_buf(tp, bp, (uint)((char *)ltp - (char *)leaf), 1275 xfs_da_log_buf(tp, bp, (uint)((char *)ltp - (char *)leaf),
1276 (uint)(mp->m_dirblksize - 1)); 1276 (uint)(mp->m_dirblksize - 1));
@@ -1806,7 +1806,7 @@ xfs_dir2_node_to_leaf(
1806 return 0; 1806 return 0;
1807 lbp = state->path.blk[0].bp; 1807 lbp = state->path.blk[0].bp;
1808 leaf = lbp->data; 1808 leaf = lbp->data;
1809 ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); 1809 ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR2_LEAFN_MAGIC);
1810 /* 1810 /*
1811 * Read the freespace block. 1811 * Read the freespace block.
1812 */ 1812 */
@@ -1837,7 +1837,7 @@ xfs_dir2_node_to_leaf(
1837 xfs_dir2_leaf_compact(args, lbp); 1837 xfs_dir2_leaf_compact(args, lbp);
1838 else 1838 else
1839 xfs_dir2_leaf_log_header(tp, lbp); 1839 xfs_dir2_leaf_log_header(tp, lbp);
1840 INT_SET(leaf->hdr.info.magic, ARCH_CONVERT, XFS_DIR2_LEAF1_MAGIC); 1840 leaf->hdr.info.magic = cpu_to_be16(XFS_DIR2_LEAF1_MAGIC);
1841 /* 1841 /*
1842 * Set up the leaf tail from the freespace block. 1842 * Set up the leaf tail from the freespace block.
1843 */ 1843 */