From 798db35f4649eac2778381c390ed7d12de9ec767 Mon Sep 17 00:00:00 2001 From: Joel Becker Date: Tue, 13 Apr 2010 14:26:32 +0800 Subject: ocfs2: Allocate discontiguous block groups. If we cannot get a contiguous region for a block group, allocate a discontiguous one when the filesystem supports it. Signed-off-by: Joel Becker Signed-off-by: Tao Ma --- fs/ocfs2/ocfs2.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fs/ocfs2/ocfs2.h') diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h index a388528f485c..d389f2714c96 100644 --- a/fs/ocfs2/ocfs2.h +++ b/fs/ocfs2/ocfs2.h @@ -491,6 +491,13 @@ static inline int ocfs2_supports_indexed_dirs(struct ocfs2_super *osb) return 0; } +static inline int ocfs2_supports_discontig_bh(struct ocfs2_super *osb) +{ + if (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_DISCONTIG_BG) + return 1; + return 0; +} + static inline unsigned int ocfs2_link_max(struct ocfs2_super *osb) { if (ocfs2_supports_indexed_dirs(osb)) -- cgit v1.2.3