f2fs: introduce new option for controlling data flush
Add a new option 'data_flush' to enable data flush functionality. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Conflicts: Documentation/filesystems/f2fs.txt
This commit is contained in:
parent
48adb63918
commit
a72a8223f7
|
@ -114,6 +114,35 @@ active_logs=%u Support configuring the number of active logs. In the
|
|||
Default number is 6.
|
||||
disable_ext_identify Disable the extension list configured by mkfs, so f2fs
|
||||
does not aware of cold files such as media files.
|
||||
inline_xattr Enable the inline xattrs feature.
|
||||
inline_data Enable the inline data feature: New created small(<~3.4k)
|
||||
files can be written into inode block.
|
||||
inline_dentry Enable the inline dir feature: data in new created
|
||||
directory entries can be written into inode block. The
|
||||
space of inode block which is used to store inline
|
||||
dentries is limited to ~3.4k.
|
||||
flush_merge Merge concurrent cache_flush commands as much as possible
|
||||
to eliminate redundant command issues. If the underlying
|
||||
device handles the cache_flush command relatively slowly,
|
||||
recommend to enable this option.
|
||||
nobarrier This option can be used if underlying storage guarantees
|
||||
its cached data should be written to the novolatile area.
|
||||
If this option is set, no cache_flush commands are issued
|
||||
but f2fs still guarantees the write ordering of all the
|
||||
data writes.
|
||||
fastboot This option is used when a system wants to reduce mount
|
||||
time as much as possible, even though normal performance
|
||||
can be sacrificed.
|
||||
extent_cache Enable an extent cache based on rb-tree, it can cache
|
||||
as many as extent which map between contiguous logical
|
||||
address and physical address per inode, resulting in
|
||||
increasing the cache hit ratio. Set by default.
|
||||
noextent_cache Disable an extent cache based on rb-tree explicitly, see
|
||||
the above extent_cache mount option.
|
||||
noinline_data Disable the inline data feature, inline data feature is
|
||||
enabled by default.
|
||||
data_flush Enable data flushing before checkpoint in order to
|
||||
persist data of regular and symlink.
|
||||
|
||||
================================================================================
|
||||
DEBUGFS ENTRIES
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#define F2FS_MOUNT_FASTBOOT 0x00001000
|
||||
#define F2FS_MOUNT_EXTENT_CACHE 0x00002000
|
||||
#define F2FS_MOUNT_FORCE_FG_GC 0x00004000
|
||||
#define F2FS_MOUNT_DATA_FLUSH 0x00008000
|
||||
|
||||
#define clear_opt(sbi, option) (sbi->mount_opt.opt &= ~F2FS_MOUNT_##option)
|
||||
#define set_opt(sbi, option) (sbi->mount_opt.opt |= F2FS_MOUNT_##option)
|
||||
|
|
|
@ -66,6 +66,7 @@ enum {
|
|||
Opt_extent_cache,
|
||||
Opt_noextent_cache,
|
||||
Opt_noinline_data,
|
||||
Opt_data_flush,
|
||||
Opt_err,
|
||||
};
|
||||
|
||||
|
@ -90,6 +91,7 @@ static match_table_t f2fs_tokens = {
|
|||
{Opt_extent_cache, "extent_cache"},
|
||||
{Opt_noextent_cache, "noextent_cache"},
|
||||
{Opt_noinline_data, "noinline_data"},
|
||||
{Opt_data_flush, "data_flush"},
|
||||
{Opt_err, NULL},
|
||||
};
|
||||
|
||||
|
@ -405,6 +407,9 @@ static int parse_options(struct super_block *sb, char *options)
|
|||
case Opt_noinline_data:
|
||||
clear_opt(sbi, INLINE_DATA);
|
||||
break;
|
||||
case Opt_data_flush:
|
||||
set_opt(sbi, DATA_FLUSH);
|
||||
break;
|
||||
default:
|
||||
f2fs_msg(sb, KERN_ERR,
|
||||
"Unrecognized mount option \"%s\" or missing value",
|
||||
|
@ -686,6 +691,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
|
|||
seq_puts(seq, ",extent_cache");
|
||||
else
|
||||
seq_puts(seq, ",noextent_cache");
|
||||
if (test_opt(sbi, DATA_FLUSH))
|
||||
seq_puts(seq, ",data_flush");
|
||||
seq_printf(seq, ",active_logs=%u", sbi->active_logs);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue