f2fs: add a new mount option for inline dir
authorChao Yu <chao2.yu@samsung.com>
Wed, 24 Sep 2014 10:16:13 +0000 (18:16 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 4 Nov 2014 00:07:31 +0000 (16:07 -0800)
Adds a new mount option 'inline_dentry' for inline dir.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/super.c

index 76b14c8c7e166154d781d6041054eccd11f1c343..73993a9e86be346be1b6eafb8cf19d2629f6b2cb 100644 (file)
@@ -51,6 +51,7 @@ enum {
        Opt_disable_ext_identify,
        Opt_inline_xattr,
        Opt_inline_data,
+       Opt_inline_dentry,
        Opt_flush_merge,
        Opt_nobarrier,
        Opt_err,
@@ -69,6 +70,7 @@ static match_table_t f2fs_tokens = {
        {Opt_disable_ext_identify, "disable_ext_identify"},
        {Opt_inline_xattr, "inline_xattr"},
        {Opt_inline_data, "inline_data"},
+       {Opt_inline_dentry, "inline_dentry"},
        {Opt_flush_merge, "flush_merge"},
        {Opt_nobarrier, "nobarrier"},
        {Opt_err, NULL},
@@ -340,6 +342,9 @@ static int parse_options(struct super_block *sb, char *options)
                case Opt_inline_data:
                        set_opt(sbi, INLINE_DATA);
                        break;
+               case Opt_inline_dentry:
+                       set_opt(sbi, INLINE_DENTRY);
+                       break;
                case Opt_flush_merge:
                        set_opt(sbi, FLUSH_MERGE);
                        break;
@@ -563,6 +568,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
                seq_puts(seq, ",disable_ext_identify");
        if (test_opt(sbi, INLINE_DATA))
                seq_puts(seq, ",inline_data");
+       if (test_opt(sbi, INLINE_DENTRY))
+               seq_puts(seq, ",inline_dentry");
        if (!f2fs_readonly(sbi->sb) && test_opt(sbi, FLUSH_MERGE))
                seq_puts(seq, ",flush_merge");
        if (test_opt(sbi, NOBARRIER))