aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_btree.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-10-30 01:54:22 -0400
committerLachlan McIlroy <lachlan@sgi.com>2008-10-30 01:54:22 -0400
commit8186e517fab1854554c48955cdbcbb6710e7baef (patch)
treec948ac3cc49516c256ed9ab9355eb49c9f7c2a43 /fs/xfs/xfs_btree.h
parentde227dd9604934d2a6d33cd332d1be431719c93e (diff)
[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>
Diffstat (limited to 'fs/xfs/xfs_btree.h')
-rw-r--r--fs/xfs/xfs_btree.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h
index 428e81f0e27e..fefbc69e500e 100644
--- a/fs/xfs/xfs_btree.h
+++ b/fs/xfs/xfs_btree.h
@@ -170,6 +170,7 @@ typedef struct xfs_btree_cur
170 struct xfs_trans *bc_tp; /* transaction we're in, if any */ 170 struct xfs_trans *bc_tp; /* transaction we're in, if any */
171 struct xfs_mount *bc_mp; /* file system mount struct */ 171 struct xfs_mount *bc_mp; /* file system mount struct */
172 const struct xfs_btree_ops *bc_ops; 172 const struct xfs_btree_ops *bc_ops;
173 uint bc_flags; /* btree features - below */
173 union { 174 union {
174 xfs_alloc_rec_incore_t a; 175 xfs_alloc_rec_incore_t a;
175 xfs_bmbt_irec_t b; 176 xfs_bmbt_irec_t b;
@@ -201,6 +202,10 @@ typedef struct xfs_btree_cur
201 } bc_private; /* per-btree type data */ 202 } bc_private; /* per-btree type data */
202} xfs_btree_cur_t; 203} xfs_btree_cur_t;
203 204
205/* cursor flags */
206#define XFS_BTREE_ROOT_IN_INODE (1<<1) /* root may be variable size */
207
208
204#define XFS_BTREE_NOERROR 0 209#define XFS_BTREE_NOERROR 0
205#define XFS_BTREE_ERROR 1 210#define XFS_BTREE_ERROR 1
206 211