[XFS] make btree root in inode support generic
The bmap btree is rooted in the inode and not in a disk block. Make the support for this feature more generic by adding a btree flag to for this feature instead of relying on the XFS_BTNUM_BMAP btnum check. Also clean up xfs_btree_get_block where this new flag is used. Based upon a patch from Dave Chinner. SGI-PV: 985583 SGI-Modid: xfs-linux-melb:xfs-kern:32180a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Bill O'Donnell <billodo@sgi.com> Signed-off-by: David Chinner <david@fromorbit.com>
This commit is contained in:

committed by
Lachlan McIlroy

parent
de227dd960
commit
8186e517fa
@@ -170,6 +170,7 @@ typedef struct xfs_btree_cur
|
||||
struct xfs_trans *bc_tp; /* transaction we're in, if any */
|
||||
struct xfs_mount *bc_mp; /* file system mount struct */
|
||||
const struct xfs_btree_ops *bc_ops;
|
||||
uint bc_flags; /* btree features - below */
|
||||
union {
|
||||
xfs_alloc_rec_incore_t a;
|
||||
xfs_bmbt_irec_t b;
|
||||
@@ -201,6 +202,10 @@ typedef struct xfs_btree_cur
|
||||
} bc_private; /* per-btree type data */
|
||||
} xfs_btree_cur_t;
|
||||
|
||||
/* cursor flags */
|
||||
#define XFS_BTREE_ROOT_IN_INODE (1<<1) /* root may be variable size */
|
||||
|
||||
|
||||
#define XFS_BTREE_NOERROR 0
|
||||
#define XFS_BTREE_ERROR 1
|
||||
|
||||
|
Reference in New Issue
Block a user