Commit 75342797 authored by Wanpeng Li's avatar Wanpeng Li Committed by Jaegeuk Kim

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: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Suggested-by: default avatarChao Yu <chao2.yu@samsung.com>
Signed-off-by: default avatarWanpeng Li <wanpeng.li@linux.intel.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 0bdee482
...@@ -144,6 +144,8 @@ extent_cache Enable an extent cache based on rb-tree, it can cache ...@@ -144,6 +144,8 @@ extent_cache Enable an extent cache based on rb-tree, it can cache
as many as extent which map between contiguous logical as many as extent which map between contiguous logical
address and physical address per inode, resulting in address and physical address per inode, resulting in
increasing the cache hit ratio. increasing the cache hit ratio.
noinline_data Disable the inline data feature, inline data feature is
enabled by default.
================================================================================ ================================================================================
DEBUGFS ENTRIES DEBUGFS ENTRIES
......
...@@ -58,6 +58,7 @@ enum { ...@@ -58,6 +58,7 @@ enum {
Opt_nobarrier, Opt_nobarrier,
Opt_fastboot, Opt_fastboot,
Opt_extent_cache, Opt_extent_cache,
Opt_noinline_data,
Opt_err, Opt_err,
}; };
...@@ -80,6 +81,7 @@ static match_table_t f2fs_tokens = { ...@@ -80,6 +81,7 @@ static match_table_t f2fs_tokens = {
{Opt_nobarrier, "nobarrier"}, {Opt_nobarrier, "nobarrier"},
{Opt_fastboot, "fastboot"}, {Opt_fastboot, "fastboot"},
{Opt_extent_cache, "extent_cache"}, {Opt_extent_cache, "extent_cache"},
{Opt_noinline_data, "noinline_data"},
{Opt_err, NULL}, {Opt_err, NULL},
}; };
...@@ -372,6 +374,9 @@ static int parse_options(struct super_block *sb, char *options) ...@@ -372,6 +374,9 @@ static int parse_options(struct super_block *sb, char *options)
case Opt_extent_cache: case Opt_extent_cache:
set_opt(sbi, EXTENT_CACHE); set_opt(sbi, EXTENT_CACHE);
break; break;
case Opt_noinline_data:
clear_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",
...@@ -596,6 +601,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root) ...@@ -596,6 +601,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
seq_puts(seq, ",disable_ext_identify"); seq_puts(seq, ",disable_ext_identify");
if (test_opt(sbi, INLINE_DATA)) if (test_opt(sbi, INLINE_DATA))
seq_puts(seq, ",inline_data"); seq_puts(seq, ",inline_data");
else
seq_puts(seq, ",noinline_data");
if (test_opt(sbi, INLINE_DENTRY)) if (test_opt(sbi, INLINE_DENTRY))
seq_puts(seq, ",inline_dentry"); seq_puts(seq, ",inline_dentry");
if (!f2fs_readonly(sbi->sb) && test_opt(sbi, FLUSH_MERGE)) if (!f2fs_readonly(sbi->sb) && test_opt(sbi, FLUSH_MERGE))
...@@ -991,6 +998,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -991,6 +998,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
sbi->active_logs = NR_CURSEG_TYPE; sbi->active_logs = NR_CURSEG_TYPE;
set_opt(sbi, BG_GC); set_opt(sbi, BG_GC);
set_opt(sbi, INLINE_DATA);
#ifdef CONFIG_F2FS_FS_XATTR #ifdef CONFIG_F2FS_FS_XATTR
set_opt(sbi, XATTR_USER); set_opt(sbi, XATTR_USER);
......
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