diff options
| author | Wanpeng Li <wanpeng.li@linux.intel.com> | 2015-03-23 22:20:27 -0400 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-04-10 18:08:52 -0400 |
| commit | 75342797988a0f9ebec400a2dde8d4de581c4079 (patch) | |
| tree | 1a80adb75f0b4dcbdc027d9b255d001c9dca77f7 /fs/f2fs | |
| parent | 0bdee482509fe8c3cf0e66231ed37b8e70954093 (diff) | |
f2fs: enable inline data by default
Enable inline_data feature by default since it brings us better
performance and space utilization and now has already stable.
Add another option noinline_data to disable it during mount.
Suggested-by: Jaegeuk Kim <jaegeuk@kernel.org>
Suggested-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
| -rw-r--r-- | fs/f2fs/super.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index fc6857f378cc..45aa843fa597 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c | |||
| @@ -58,6 +58,7 @@ enum { | |||
| 58 | Opt_nobarrier, | 58 | Opt_nobarrier, |
| 59 | Opt_fastboot, | 59 | Opt_fastboot, |
| 60 | Opt_extent_cache, | 60 | Opt_extent_cache, |
| 61 | Opt_noinline_data, | ||
| 61 | Opt_err, | 62 | Opt_err, |
| 62 | }; | 63 | }; |
| 63 | 64 | ||
| @@ -80,6 +81,7 @@ static match_table_t f2fs_tokens = { | |||
| 80 | {Opt_nobarrier, "nobarrier"}, | 81 | {Opt_nobarrier, "nobarrier"}, |
| 81 | {Opt_fastboot, "fastboot"}, | 82 | {Opt_fastboot, "fastboot"}, |
| 82 | {Opt_extent_cache, "extent_cache"}, | 83 | {Opt_extent_cache, "extent_cache"}, |
| 84 | {Opt_noinline_data, "noinline_data"}, | ||
| 83 | {Opt_err, NULL}, | 85 | {Opt_err, NULL}, |
| 84 | }; | 86 | }; |
| 85 | 87 | ||
| @@ -372,6 +374,9 @@ static int parse_options(struct super_block *sb, char *options) | |||
| 372 | case Opt_extent_cache: | 374 | case Opt_extent_cache: |
| 373 | set_opt(sbi, EXTENT_CACHE); | 375 | set_opt(sbi, EXTENT_CACHE); |
| 374 | break; | 376 | break; |
| 377 | case Opt_noinline_data: | ||
| 378 | clear_opt(sbi, INLINE_DATA); | ||
| 379 | break; | ||
| 375 | default: | 380 | default: |
| 376 | f2fs_msg(sb, KERN_ERR, | 381 | f2fs_msg(sb, KERN_ERR, |
| 377 | "Unrecognized mount option \"%s\" or missing value", | 382 | "Unrecognized mount option \"%s\" or missing value", |
| @@ -596,6 +601,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root) | |||
| 596 | seq_puts(seq, ",disable_ext_identify"); | 601 | seq_puts(seq, ",disable_ext_identify"); |
| 597 | if (test_opt(sbi, INLINE_DATA)) | 602 | if (test_opt(sbi, INLINE_DATA)) |
| 598 | seq_puts(seq, ",inline_data"); | 603 | seq_puts(seq, ",inline_data"); |
| 604 | else | ||
| 605 | seq_puts(seq, ",noinline_data"); | ||
| 599 | if (test_opt(sbi, INLINE_DENTRY)) | 606 | if (test_opt(sbi, INLINE_DENTRY)) |
| 600 | seq_puts(seq, ",inline_dentry"); | 607 | seq_puts(seq, ",inline_dentry"); |
| 601 | if (!f2fs_readonly(sbi->sb) && test_opt(sbi, FLUSH_MERGE)) | 608 | if (!f2fs_readonly(sbi->sb) && test_opt(sbi, FLUSH_MERGE)) |
| @@ -991,6 +998,7 @@ try_onemore: | |||
| 991 | sbi->active_logs = NR_CURSEG_TYPE; | 998 | sbi->active_logs = NR_CURSEG_TYPE; |
| 992 | 999 | ||
| 993 | set_opt(sbi, BG_GC); | 1000 | set_opt(sbi, BG_GC); |
| 1001 | set_opt(sbi, INLINE_DATA); | ||
| 994 | 1002 | ||
| 995 | #ifdef CONFIG_F2FS_FS_XATTR | 1003 | #ifdef CONFIG_F2FS_FS_XATTR |
| 996 | set_opt(sbi, XATTR_USER); | 1004 | set_opt(sbi, XATTR_USER); |
