aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_itable.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-09-27 20:57:04 -0400
committerTim Shimmin <tes@sgi.com>2006-09-27 20:57:04 -0400
commit61a258486795ff710cf4518b5a1729c965c32aa0 (patch)
tree80ed20512f5c811f5114ac99eeecca88220a7787 /fs/xfs/xfs_itable.c
parente21010053a0f11122db728f82ae115f2808752d6 (diff)
[XFS] endianess annotations for xfs_inobt_rec_t / xfs_inobt_key_t
SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26556a Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_itable.c')
-rw-r--r--fs/xfs/xfs_itable.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c
index 46249e4d1fea..7521f301ee58 100644
--- a/fs/xfs/xfs_itable.c
+++ b/fs/xfs/xfs_itable.c
@@ -395,9 +395,9 @@ xfs_bulkstat(
395 gcnt++; 395 gcnt++;
396 } 396 }
397 gfree |= XFS_INOBT_MASKN(0, chunkidx); 397 gfree |= XFS_INOBT_MASKN(0, chunkidx);
398 INT_SET(irbp->ir_startino, ARCH_CONVERT, gino); 398 irbp->ir_startino = cpu_to_be32(gino);
399 INT_SET(irbp->ir_freecount, ARCH_CONVERT, gcnt); 399 irbp->ir_freecount = cpu_to_be32(gcnt);
400 INT_SET(irbp->ir_free, ARCH_CONVERT, gfree); 400 irbp->ir_free = cpu_to_be64(gfree);
401 irbp++; 401 irbp++;
402 agino = gino + XFS_INODES_PER_CHUNK; 402 agino = gino + XFS_INODES_PER_CHUNK;
403 icount = XFS_INODES_PER_CHUNK - gcnt; 403 icount = XFS_INODES_PER_CHUNK - gcnt;
@@ -453,9 +453,9 @@ xfs_bulkstat(
453 * If this chunk has any allocated inodes, save it. 453 * If this chunk has any allocated inodes, save it.
454 */ 454 */
455 if (gcnt < XFS_INODES_PER_CHUNK) { 455 if (gcnt < XFS_INODES_PER_CHUNK) {
456 INT_SET(irbp->ir_startino, ARCH_CONVERT, gino); 456 irbp->ir_startino = cpu_to_be32(gino);
457 INT_SET(irbp->ir_freecount, ARCH_CONVERT, gcnt); 457 irbp->ir_freecount = cpu_to_be32(gcnt);
458 INT_SET(irbp->ir_free, ARCH_CONVERT, gfree); 458 irbp->ir_free = cpu_to_be64(gfree);
459 irbp++; 459 irbp++;
460 icount += XFS_INODES_PER_CHUNK - gcnt; 460 icount += XFS_INODES_PER_CHUNK - gcnt;
461 } 461 }
@@ -488,14 +488,14 @@ xfs_bulkstat(
488 * inodes in that cluster. 488 * inodes in that cluster.
489 */ 489 */
490 for (agbno = XFS_AGINO_TO_AGBNO(mp, 490 for (agbno = XFS_AGINO_TO_AGBNO(mp,
491 INT_GET(irbp[1].ir_startino, ARCH_CONVERT)), 491 be32_to_cpu(irbp[1].ir_startino)),
492 chunkidx = 0; 492 chunkidx = 0;
493 chunkidx < XFS_INODES_PER_CHUNK; 493 chunkidx < XFS_INODES_PER_CHUNK;
494 chunkidx += nicluster, 494 chunkidx += nicluster,
495 agbno += nbcluster) { 495 agbno += nbcluster) {
496 if (XFS_INOBT_MASKN(chunkidx, 496 if (XFS_INOBT_MASKN(chunkidx,
497 nicluster) & 497 nicluster) &
498 ~(INT_GET(irbp[1].ir_free, ARCH_CONVERT))) 498 ~(be64_to_cpu(irbp[1].ir_free)))
499 xfs_btree_reada_bufs(mp, agno, 499 xfs_btree_reada_bufs(mp, agno,
500 agbno, nbcluster); 500 agbno, nbcluster);
501 } 501 }
@@ -503,9 +503,9 @@ xfs_bulkstat(
503 /* 503 /*
504 * Now process this chunk of inodes. 504 * Now process this chunk of inodes.
505 */ 505 */
506 for (agino = INT_GET(irbp->ir_startino, ARCH_CONVERT), chunkidx = 0, clustidx = 0; 506 for (agino = be32_to_cpu(irbp->ir_startino), chunkidx = 0, clustidx = 0;
507 ubleft > 0 && 507 ubleft > 0 &&
508 INT_GET(irbp->ir_freecount, ARCH_CONVERT) < XFS_INODES_PER_CHUNK; 508 be32_to_cpu(irbp->ir_freecount) < XFS_INODES_PER_CHUNK;
509 chunkidx++, clustidx++, agino++) { 509 chunkidx++, clustidx++, agino++) {
510 ASSERT(chunkidx < XFS_INODES_PER_CHUNK); 510 ASSERT(chunkidx < XFS_INODES_PER_CHUNK);
511 /* 511 /*
@@ -525,7 +525,7 @@ xfs_bulkstat(
525 */ 525 */
526 if ((chunkidx & (nicluster - 1)) == 0) { 526 if ((chunkidx & (nicluster - 1)) == 0) {
527 agbno = XFS_AGINO_TO_AGBNO(mp, 527 agbno = XFS_AGINO_TO_AGBNO(mp,
528 INT_GET(irbp->ir_startino, ARCH_CONVERT)) + 528 be32_to_cpu(irbp->ir_startino)) +
529 ((chunkidx & nimask) >> 529 ((chunkidx & nimask) >>
530 mp->m_sb.sb_inopblog); 530 mp->m_sb.sb_inopblog);
531 531
@@ -564,13 +564,13 @@ xfs_bulkstat(
564 /* 564 /*
565 * Skip if this inode is free. 565 * Skip if this inode is free.
566 */ 566 */
567 if (XFS_INOBT_MASK(chunkidx) & INT_GET(irbp->ir_free, ARCH_CONVERT)) 567 if (XFS_INOBT_MASK(chunkidx) & be64_to_cpu(irbp->ir_free))
568 continue; 568 continue;
569 /* 569 /*
570 * Count used inodes as free so we can tell 570 * Count used inodes as free so we can tell
571 * when the chunk is used up. 571 * when the chunk is used up.
572 */ 572 */
573 INT_MOD(irbp->ir_freecount, ARCH_CONVERT, +1); 573 be32_add(&irbp->ir_freecount, 1);
574 ino = XFS_AGINO_TO_INO(mp, agno, agino); 574 ino = XFS_AGINO_TO_INO(mp, agno, agino);
575 bno = XFS_AGB_TO_DADDR(mp, agno, agbno); 575 bno = XFS_AGB_TO_DADDR(mp, agno, agbno);
576 if (flags & BULKSTAT_FG_QUICK) { 576 if (flags & BULKSTAT_FG_QUICK) {