aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_btree.c12
-rw-r--r--fs/xfs/xfs_btree.h7
2 files changed, 7 insertions, 12 deletions
diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c
index cc593a84c345..31002093bfb7 100644
--- a/fs/xfs/xfs_btree.c
+++ b/fs/xfs/xfs_btree.c
@@ -62,13 +62,13 @@ xfs_btree_maxrecs(
62 case XFS_BTNUM_BNO: 62 case XFS_BTNUM_BNO:
63 case XFS_BTNUM_CNT: 63 case XFS_BTNUM_CNT:
64 return (int)XFS_ALLOC_BLOCK_MAXRECS( 64 return (int)XFS_ALLOC_BLOCK_MAXRECS(
65 be16_to_cpu(block->bb_h.bb_level), cur); 65 be16_to_cpu(block->bb_level), cur);
66 case XFS_BTNUM_BMAP: 66 case XFS_BTNUM_BMAP:
67 return (int)XFS_BMAP_BLOCK_IMAXRECS( 67 return (int)XFS_BMAP_BLOCK_IMAXRECS(
68 be16_to_cpu(block->bb_h.bb_level), cur); 68 be16_to_cpu(block->bb_level), cur);
69 case XFS_BTNUM_INO: 69 case XFS_BTNUM_INO:
70 return (int)XFS_INOBT_BLOCK_MAXRECS( 70 return (int)XFS_INOBT_BLOCK_MAXRECS(
71 be16_to_cpu(block->bb_h.bb_level), cur); 71 be16_to_cpu(block->bb_level), cur);
72 default: 72 default:
73 ASSERT(0); 73 ASSERT(0);
74 return 0; 74 return 0;
@@ -634,7 +634,7 @@ xfs_btree_firstrec(
634 /* 634 /*
635 * It's empty, there is no such record. 635 * It's empty, there is no such record.
636 */ 636 */
637 if (!block->bb_h.bb_numrecs) 637 if (!block->bb_numrecs)
638 return 0; 638 return 0;
639 /* 639 /*
640 * Set the ptr value to 1, that's the first record/key. 640 * Set the ptr value to 1, that's the first record/key.
@@ -663,12 +663,12 @@ xfs_btree_lastrec(
663 /* 663 /*
664 * It's empty, there is no such record. 664 * It's empty, there is no such record.
665 */ 665 */
666 if (!block->bb_h.bb_numrecs) 666 if (!block->bb_numrecs)
667 return 0; 667 return 0;
668 /* 668 /*
669 * Set the ptr value to numrecs, that's the last record/key. 669 * Set the ptr value to numrecs, that's the last record/key.
670 */ 670 */
671 cur->bc_ptrs[level] = be16_to_cpu(block->bb_h.bb_numrecs); 671 cur->bc_ptrs[level] = be16_to_cpu(block->bb_numrecs);
672 return 1; 672 return 1;
673} 673}
674 674
diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h
index 1f528a2a3754..332b9f1da203 100644
--- a/fs/xfs/xfs_btree.h
+++ b/fs/xfs/xfs_btree.h
@@ -63,15 +63,10 @@ typedef struct xfs_btree_lblock {
63/* 63/*
64 * Combined header and structure, used by common code. 64 * Combined header and structure, used by common code.
65 */ 65 */
66typedef struct xfs_btree_hdr 66typedef struct xfs_btree_block {
67{
68 __be32 bb_magic; /* magic number for block type */ 67 __be32 bb_magic; /* magic number for block type */
69 __be16 bb_level; /* 0 is a leaf */ 68 __be16 bb_level; /* 0 is a leaf */
70 __be16 bb_numrecs; /* current # of data records */ 69 __be16 bb_numrecs; /* current # of data records */
71} xfs_btree_hdr_t;
72
73typedef struct xfs_btree_block {
74 xfs_btree_hdr_t bb_h; /* header */
75 union { 70 union {
76 struct { 71 struct {
77 __be32 bb_leftsib; 72 __be32 bb_leftsib;