Commit 8274de77 authored by Huajun Li's avatar Huajun Li Committed by Jaegeuk Kim

f2fs: add a new mount option: inline_data

Add a mount option: inline_data. If the mount option is set,
data of New created small files can be stored in their inode.
Signed-off-by: default avatarHuajun Li <huajun.li@intel.com>
Signed-off-by: default avatarHaicheng Li <haicheng.li@linux.intel.com>
Signed-off-by: default avatarWeihong Xu <weihong.xu@intel.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent 1001b347
...@@ -50,6 +50,7 @@ enum { ...@@ -50,6 +50,7 @@ enum {
Opt_active_logs, Opt_active_logs,
Opt_disable_ext_identify, Opt_disable_ext_identify,
Opt_inline_xattr, Opt_inline_xattr,
Opt_inline_data,
Opt_err, Opt_err,
}; };
...@@ -65,6 +66,7 @@ static match_table_t f2fs_tokens = { ...@@ -65,6 +66,7 @@ static match_table_t f2fs_tokens = {
{Opt_active_logs, "active_logs=%u"}, {Opt_active_logs, "active_logs=%u"},
{Opt_disable_ext_identify, "disable_ext_identify"}, {Opt_disable_ext_identify, "disable_ext_identify"},
{Opt_inline_xattr, "inline_xattr"}, {Opt_inline_xattr, "inline_xattr"},
{Opt_inline_data, "inline_data"},
{Opt_err, NULL}, {Opt_err, NULL},
}; };
...@@ -313,6 +315,9 @@ static int parse_options(struct super_block *sb, char *options) ...@@ -313,6 +315,9 @@ static int parse_options(struct super_block *sb, char *options)
case Opt_disable_ext_identify: case Opt_disable_ext_identify:
set_opt(sbi, DISABLE_EXT_IDENTIFY); set_opt(sbi, DISABLE_EXT_IDENTIFY);
break; break;
case Opt_inline_data:
set_opt(sbi, INLINE_DATA);
break;
default: default:
f2fs_msg(sb, KERN_ERR, f2fs_msg(sb, KERN_ERR,
"Unrecognized mount option \"%s\" or missing value", "Unrecognized mount option \"%s\" or missing value",
...@@ -510,7 +515,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root) ...@@ -510,7 +515,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
#endif #endif
if (test_opt(sbi, DISABLE_EXT_IDENTIFY)) if (test_opt(sbi, DISABLE_EXT_IDENTIFY))
seq_puts(seq, ",disable_ext_identify"); seq_puts(seq, ",disable_ext_identify");
if (test_opt(sbi, INLINE_DATA))
seq_puts(seq, ",inline_data");
seq_printf(seq, ",active_logs=%u", sbi->active_logs); seq_printf(seq, ",active_logs=%u", sbi->active_logs);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment