aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2.h
diff options
context:
space:
mode:
authorJoseph Qi <joseph.qi@huawei.com>2015-02-16 16:00:15 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-16 17:56:05 -0800
commit160cc266639d4213c15c103074561c1b44ffe691 (patch)
tree5994c8a38cb2f52b7cad048a3827aac9015fe28f /fs/ocfs2/ocfs2.h
parent4813962beef7586f890a645a1bda77691da4b74a (diff)
downloadlinux-160cc266639d4213c15c103074561c1b44ffe691.tar.gz
ocfs2: set append dio as a ro compat feature
Intruduce a bit OCFS2_FEATURE_RO_COMPAT_APPEND_DIO and check it in write flow. If the bit is not set, fall back to the old way. Signed-off-by: Joseph Qi <joseph.qi@huawei.com> Cc: Weiwei Wang <wangww631@huawei.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Xuejiufei <xuejiufei@huawei.com> Cc: alex chen <alex.chen@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2/ocfs2.h')
-rw-r--r--fs/ocfs2/ocfs2.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
index 7e39cd654834e9..8490c64d34fef4 100644
--- a/fs/ocfs2/ocfs2.h
+++ b/fs/ocfs2/ocfs2.h
@@ -500,6 +500,14 @@ static inline int ocfs2_writes_unwritten_extents(struct ocfs2_super *osb)
return 0;
}
+static inline int ocfs2_supports_append_dio(struct ocfs2_super *osb)
+{
+ if (osb->s_feature_ro_compat & OCFS2_FEATURE_RO_COMPAT_APPEND_DIO)
+ return 1;
+ return 0;
+}
+
+
static inline int ocfs2_supports_inline_data(struct ocfs2_super *osb)
{
if (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_INLINE_DATA)