[Ocfs2-tools-devel] [PATCH 09/10] tunefs.ocfs2: Support enable inline_data in tunefs.

Tao Ma tao.ma at oracle.com
Thu Jul 10 23:21:02 PDT 2008


Enable inline data is quite simple, we just need to modify
the incompat flag. As for disabling inline data, it will
by done by another patch in the next round.

Signed-off-by: Tao Ma <tao.ma at oracle.com>
---
 tunefs.ocfs2/features.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/tunefs.ocfs2/features.c b/tunefs.ocfs2/features.c
index 36307c8..496d564 100644
--- a/tunefs.ocfs2/features.c
+++ b/tunefs.ocfs2/features.c
@@ -36,7 +36,8 @@ extern ocfs2_tune_opts opts;
 #define TUNEFS_RO_COMPAT_SET	OCFS2_FEATURE_RO_COMPAT_UNWRITTEN
 #define TUNEFS_RO_COMPAT_CLEAR	OCFS2_FEATURE_RO_COMPAT_UNWRITTEN
 #define TUNEFS_INCOMPAT_SET	(OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC | \
-				 OCFS2_FEATURE_INCOMPAT_EXTENDED_SLOT_MAP)
+				 OCFS2_FEATURE_INCOMPAT_EXTENDED_SLOT_MAP | \
+				 OCFS2_FEATURE_INCOMPAT_INLINE_DATA)
 #define TUNEFS_INCOMPAT_CLEAR	(OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC | \
 				 OCFS2_FEATURE_INCOMPAT_EXTENDED_SLOT_MAP)
 
@@ -149,6 +150,10 @@ errcode_t update_feature(ocfs2_filesys *fs)
 	    OCFS2_FEATURE_INCOMPAT_EXTENDED_SLOT_MAP)
 		ret = reformat_slot_map(fs);
 
+	if (opts.set_feature.incompat & OCFS2_FEATURE_INCOMPAT_INLINE_DATA)
+		OCFS2_SET_INCOMPAT_FEATURE(OCFS2_RAW_SB(fs->fs_super),
+					   OCFS2_FEATURE_INCOMPAT_INLINE_DATA);
+
 bail:
 	return ret;
 }
-- 
1.5.4.GIT




More information about the Ocfs2-tools-devel mailing list