f2fs: add nodiscard mount option
This patch adds 'nodiscard' mount option. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Conflicts: Documentation/filesystems/f2fs.txt
This commit is contained in:
parent
3a4806bb83
commit
d959f7defb
|
@ -98,10 +98,20 @@ Cleaning Overhead
|
|||
MOUNT OPTIONS
|
||||
================================================================================
|
||||
|
||||
background_gc_off Turn off cleaning operations, namely garbage collection,
|
||||
triggered in background when I/O subsystem is idle.
|
||||
background_gc=%s Turn on/off cleaning operations, namely garbage
|
||||
collection, triggered in background when I/O subsystem is
|
||||
idle. If background_gc=on, it will turn on the garbage
|
||||
collection and if background_gc=off, garbage collection
|
||||
will be turned off. If background_gc=sync, it will turn
|
||||
on synchronous garbage collection running in background.
|
||||
Default value for this option is on. So garbage
|
||||
collection is on by default.
|
||||
disable_roll_forward Disable the roll-forward recovery routine
|
||||
discard Issue discard/TRIM commands when a segment is cleaned.
|
||||
norecovery Disable the roll-forward recovery routine, mounted read-
|
||||
only (i.e., -o ro,disable_roll_forward)
|
||||
discard/nodiscard Enable/disable real-time discard in f2fs, if discard is
|
||||
enabled, f2fs will issue discard/TRIM commands when a
|
||||
segment is cleaned.
|
||||
no_heap Disable heap-style segment allocation which finds free
|
||||
segments for data from the beginning of main area, while
|
||||
for node from the end of main area.
|
||||
|
|
|
@ -75,6 +75,7 @@ enum {
|
|||
Opt_disable_roll_forward,
|
||||
Opt_norecovery,
|
||||
Opt_discard,
|
||||
Opt_nodiscard,
|
||||
Opt_noheap,
|
||||
Opt_user_xattr,
|
||||
Opt_nouser_xattr,
|
||||
|
@ -103,6 +104,7 @@ static match_table_t f2fs_tokens = {
|
|||
{Opt_disable_roll_forward, "disable_roll_forward"},
|
||||
{Opt_norecovery, "norecovery"},
|
||||
{Opt_discard, "discard"},
|
||||
{Opt_nodiscard, "nodiscard"},
|
||||
{Opt_noheap, "no_heap"},
|
||||
{Opt_user_xattr, "user_xattr"},
|
||||
{Opt_nouser_xattr, "nouser_xattr"},
|
||||
|
@ -421,6 +423,8 @@ static int parse_options(struct super_block *sb, char *options)
|
|||
"the device does not support discard");
|
||||
}
|
||||
break;
|
||||
case Opt_nodiscard:
|
||||
clear_opt(sbi, DISCARD);
|
||||
case Opt_noheap:
|
||||
set_opt(sbi, NOHEAP);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue