aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorHuajun Li <huajun.li@intel.com>2013-11-10 10:13:17 -0500
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-12-22 20:18:03 -0500
commit8274de77b7072d983fe4b452b981b3e520f12698 (patch)
treea1c628df97ab4ade54dabe885cb27943695101a7 /fs/f2fs/super.c
parent1001b3479ce96e37aed5e4fcdc3c60126e034d08 (diff)
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: Huajun Li <huajun.li@intel.com> Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com> Signed-off-by: Weihong Xu <weihong.xu@intel.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 9981b28744ed..43f11cae408b 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -50,6 +50,7 @@ enum {
50 Opt_active_logs, 50 Opt_active_logs,
51 Opt_disable_ext_identify, 51 Opt_disable_ext_identify,
52 Opt_inline_xattr, 52 Opt_inline_xattr,
53 Opt_inline_data,
53 Opt_err, 54 Opt_err,
54}; 55};
55 56
@@ -65,6 +66,7 @@ static match_table_t f2fs_tokens = {
65 {Opt_active_logs, "active_logs=%u"}, 66 {Opt_active_logs, "active_logs=%u"},
66 {Opt_disable_ext_identify, "disable_ext_identify"}, 67 {Opt_disable_ext_identify, "disable_ext_identify"},
67 {Opt_inline_xattr, "inline_xattr"}, 68 {Opt_inline_xattr, "inline_xattr"},
69 {Opt_inline_data, "inline_data"},
68 {Opt_err, NULL}, 70 {Opt_err, NULL},
69}; 71};
70 72
@@ -313,6 +315,9 @@ static int parse_options(struct super_block *sb, char *options)
313 case Opt_disable_ext_identify: 315 case Opt_disable_ext_identify:
314 set_opt(sbi, DISABLE_EXT_IDENTIFY); 316 set_opt(sbi, DISABLE_EXT_IDENTIFY);
315 break; 317 break;
318 case Opt_inline_data:
319 set_opt(sbi, INLINE_DATA);
320 break;
316 default: 321 default:
317 f2fs_msg(sb, KERN_ERR, 322 f2fs_msg(sb, KERN_ERR,
318 "Unrecognized mount option \"%s\" or missing value", 323 "Unrecognized mount option \"%s\" or missing value",
@@ -510,7 +515,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
510#endif 515#endif
511 if (test_opt(sbi, DISABLE_EXT_IDENTIFY)) 516 if (test_opt(sbi, DISABLE_EXT_IDENTIFY))
512 seq_puts(seq, ",disable_ext_identify"); 517 seq_puts(seq, ",disable_ext_identify");
513 518 if (test_opt(sbi, INLINE_DATA))
519 seq_puts(seq, ",inline_data");
514 seq_printf(seq, ",active_logs=%u", sbi->active_logs); 520 seq_printf(seq, ",active_logs=%u", sbi->active_logs);
515 521
516 return 0; 522 return 0;