aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2.h
diff options
context:
space:
mode:
authorMark Fasheh <mark.fasheh@oracle.com>2007-01-16 14:32:23 -0500
committerMark Fasheh <mark.fasheh@oracle.com>2007-04-26 17:44:03 -0400
commitdcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8 (patch)
tree226d725f8199907cea2433d1d183b01e51d9bc55 /fs/ocfs2/ocfs2.h
parent6f16bf655c5795586dd2ac96a7c70e0b9a378746 (diff)
ocfs2: sparse b-tree support
Introduce tree rotations into the b-tree code. This will allow ocfs2 to support sparse files. Much of the added code is designed to be generic (in the ocfs2 sense) so that it can later be re-used to implement large extended attributes. This patch only adds the rotation code and does minimal updates to callers of the extent api. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/ocfs2.h')
-rw-r--r--fs/ocfs2/ocfs2.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
index db8e77cd35d3..fe7e1ecafca5 100644
--- a/fs/ocfs2/ocfs2.h
+++ b/fs/ocfs2/ocfs2.h
@@ -303,6 +303,13 @@ static inline int ocfs2_should_order_data(struct inode *inode)
303 return 1; 303 return 1;
304} 304}
305 305
306static inline int ocfs2_sparse_alloc(struct ocfs2_super *osb)
307{
308 if (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC)
309 return 1;
310 return 0;
311}
312
306/* set / clear functions because cluster events can make these happen 313/* set / clear functions because cluster events can make these happen
307 * in parallel so we want the transitions to be atomic. this also 314 * in parallel so we want the transitions to be atomic. this also
308 * means that any future flags osb_flags must be protected by spinlock 315 * means that any future flags osb_flags must be protected by spinlock