diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-08-13 02:25:27 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-08-13 02:25:27 -0400 |
commit | 169d6227a71da125913c69c381643a8ae89da62d (patch) | |
tree | dfd2fbd343e7be583c5e767f897140de7ccc482c /fs/xfs/xfs_btree.c | |
parent | cdcf43335cbb2380e533441e007e0c4ec42634d5 (diff) |
[XFS] Use the same btree_cur union member for alloc and inobt trees.
The alloc and inobt btree use the same agbp/agno pair in the btree_cur
union. Make them use the same bc_private.a union member so that code for
these two short form btree implementations can be shared.
SGI-PV: 981498
SGI-Modid: xfs-linux-melb:xfs-kern:31788a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_btree.c')
-rw-r--r-- | fs/xfs/xfs_btree.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c index 2b0d454e92ec..cc593a84c345 100644 --- a/fs/xfs/xfs_btree.c +++ b/fs/xfs/xfs_btree.c | |||
@@ -570,6 +570,13 @@ xfs_btree_init_cursor( | |||
570 | cur->bc_private.a.agbp = agbp; | 570 | cur->bc_private.a.agbp = agbp; |
571 | cur->bc_private.a.agno = agno; | 571 | cur->bc_private.a.agno = agno; |
572 | break; | 572 | break; |
573 | case XFS_BTNUM_INO: | ||
574 | /* | ||
575 | * Inode allocation btree fields. | ||
576 | */ | ||
577 | cur->bc_private.a.agbp = agbp; | ||
578 | cur->bc_private.a.agno = agno; | ||
579 | break; | ||
573 | case XFS_BTNUM_BMAP: | 580 | case XFS_BTNUM_BMAP: |
574 | /* | 581 | /* |
575 | * Bmap btree fields. | 582 | * Bmap btree fields. |
@@ -582,13 +589,6 @@ xfs_btree_init_cursor( | |||
582 | cur->bc_private.b.flags = 0; | 589 | cur->bc_private.b.flags = 0; |
583 | cur->bc_private.b.whichfork = whichfork; | 590 | cur->bc_private.b.whichfork = whichfork; |
584 | break; | 591 | break; |
585 | case XFS_BTNUM_INO: | ||
586 | /* | ||
587 | * Inode allocation btree fields. | ||
588 | */ | ||
589 | cur->bc_private.i.agbp = agbp; | ||
590 | cur->bc_private.i.agno = agno; | ||
591 | break; | ||
592 | default: | 592 | default: |
593 | ASSERT(0); | 593 | ASSERT(0); |
594 | } | 594 | } |
@@ -863,12 +863,12 @@ xfs_btree_readahead_core( | |||
863 | case XFS_BTNUM_INO: | 863 | case XFS_BTNUM_INO: |
864 | i = XFS_BUF_TO_INOBT_BLOCK(cur->bc_bufs[lev]); | 864 | i = XFS_BUF_TO_INOBT_BLOCK(cur->bc_bufs[lev]); |
865 | if ((lr & XFS_BTCUR_LEFTRA) && be32_to_cpu(i->bb_leftsib) != NULLAGBLOCK) { | 865 | if ((lr & XFS_BTCUR_LEFTRA) && be32_to_cpu(i->bb_leftsib) != NULLAGBLOCK) { |
866 | xfs_btree_reada_bufs(cur->bc_mp, cur->bc_private.i.agno, | 866 | xfs_btree_reada_bufs(cur->bc_mp, cur->bc_private.a.agno, |
867 | be32_to_cpu(i->bb_leftsib), 1); | 867 | be32_to_cpu(i->bb_leftsib), 1); |
868 | rval++; | 868 | rval++; |
869 | } | 869 | } |
870 | if ((lr & XFS_BTCUR_RIGHTRA) && be32_to_cpu(i->bb_rightsib) != NULLAGBLOCK) { | 870 | if ((lr & XFS_BTCUR_RIGHTRA) && be32_to_cpu(i->bb_rightsib) != NULLAGBLOCK) { |
871 | xfs_btree_reada_bufs(cur->bc_mp, cur->bc_private.i.agno, | 871 | xfs_btree_reada_bufs(cur->bc_mp, cur->bc_private.a.agno, |
872 | be32_to_cpu(i->bb_rightsib), 1); | 872 | be32_to_cpu(i->bb_rightsib), 1); |
873 | rval++; | 873 | rval++; |
874 | } | 874 | } |