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 | |
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>
-rw-r--r-- | Documentation/filesystems/f2fs.txt | 2 | ||||
-rw-r--r-- | fs/f2fs/super.c | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index 48e2123c2582..e9e750e59efc 100644 --- a/Documentation/filesystems/f2fs.txt +++ b/Documentation/filesystems/f2fs.txt | |||
@@ -144,6 +144,8 @@ extent_cache Enable an extent cache based on rb-tree, it can cache | |||
144 | as many as extent which map between contiguous logical | 144 | as many as extent which map between contiguous logical |
145 | address and physical address per inode, resulting in | 145 | address and physical address per inode, resulting in |
146 | increasing the cache hit ratio. | 146 | increasing the cache hit ratio. |
147 | noinline_data Disable the inline data feature, inline data feature is | ||
148 | enabled by default. | ||
147 | 149 | ||
148 | ================================================================================ | 150 | ================================================================================ |
149 | DEBUGFS ENTRIES | 151 | DEBUGFS ENTRIES |
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); |