Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124779
b: refs/heads/master
c: f2277f0
h: refs/heads/master
i:
  124777: 3919a05
  124775: 218532d
v: v3
  • Loading branch information
Christoph Hellwig authored and Lachlan McIlroy committed Oct 30, 2008
1 parent 9168d8c commit c597675
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f338f9036400e453ab553b16639a9cc838b02d44
refs/heads/master: f2277f06e626d694e61bb356524ff536ced24acf
12 changes: 6 additions & 6 deletions trunk/fs/xfs/xfs_btree.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ xfs_btree_maxrecs(
case XFS_BTNUM_BNO:
case XFS_BTNUM_CNT:
return (int)XFS_ALLOC_BLOCK_MAXRECS(
be16_to_cpu(block->bb_h.bb_level), cur);
be16_to_cpu(block->bb_level), cur);
case XFS_BTNUM_BMAP:
return (int)XFS_BMAP_BLOCK_IMAXRECS(
be16_to_cpu(block->bb_h.bb_level), cur);
be16_to_cpu(block->bb_level), cur);
case XFS_BTNUM_INO:
return (int)XFS_INOBT_BLOCK_MAXRECS(
be16_to_cpu(block->bb_h.bb_level), cur);
be16_to_cpu(block->bb_level), cur);
default:
ASSERT(0);
return 0;
Expand Down Expand Up @@ -634,7 +634,7 @@ xfs_btree_firstrec(
/*
* It's empty, there is no such record.
*/
if (!block->bb_h.bb_numrecs)
if (!block->bb_numrecs)
return 0;
/*
* Set the ptr value to 1, that's the first record/key.
Expand Down Expand Up @@ -663,12 +663,12 @@ xfs_btree_lastrec(
/*
* It's empty, there is no such record.
*/
if (!block->bb_h.bb_numrecs)
if (!block->bb_numrecs)
return 0;
/*
* Set the ptr value to numrecs, that's the last record/key.
*/
cur->bc_ptrs[level] = be16_to_cpu(block->bb_h.bb_numrecs);
cur->bc_ptrs[level] = be16_to_cpu(block->bb_numrecs);
return 1;
}

Expand Down
7 changes: 1 addition & 6 deletions trunk/fs/xfs/xfs_btree.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,10 @@ typedef struct xfs_btree_lblock {
/*
* Combined header and structure, used by common code.
*/
typedef struct xfs_btree_hdr
{
typedef struct xfs_btree_block {
__be32 bb_magic; /* magic number for block type */
__be16 bb_level; /* 0 is a leaf */
__be16 bb_numrecs; /* current # of data records */
} xfs_btree_hdr_t;

typedef struct xfs_btree_block {
xfs_btree_hdr_t bb_h; /* header */
union {
struct {
__be32 bb_leftsib;
Expand Down

0 comments on commit c597675

Please sign in to comment.