提交 64058be9 编写于 作者: C Chao Yu 提交者: Jaegeuk Kim

f2fs: add nodiscard mount option

This patch adds 'nodiscard' mount option.
Signed-off-by: NChao Yu <yuchao0@huawei.com>
Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
上级 72e1c797
...@@ -109,7 +109,9 @@ background_gc=%s Turn on/off cleaning operations, namely garbage ...@@ -109,7 +109,9 @@ background_gc=%s Turn on/off cleaning operations, namely garbage
disable_roll_forward Disable the roll-forward recovery routine disable_roll_forward Disable the roll-forward recovery routine
norecovery Disable the roll-forward recovery routine, mounted read- norecovery Disable the roll-forward recovery routine, mounted read-
only (i.e., -o ro,disable_roll_forward) only (i.e., -o ro,disable_roll_forward)
discard Issue discard/TRIM commands when a segment is cleaned. 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 no_heap Disable heap-style segment allocation which finds free
segments for data from the beginning of main area, while segments for data from the beginning of main area, while
for node from the end of main area. for node from the end of main area.
......
...@@ -76,6 +76,7 @@ enum { ...@@ -76,6 +76,7 @@ enum {
Opt_disable_roll_forward, Opt_disable_roll_forward,
Opt_norecovery, Opt_norecovery,
Opt_discard, Opt_discard,
Opt_nodiscard,
Opt_noheap, Opt_noheap,
Opt_user_xattr, Opt_user_xattr,
Opt_nouser_xattr, Opt_nouser_xattr,
...@@ -106,6 +107,7 @@ static match_table_t f2fs_tokens = { ...@@ -106,6 +107,7 @@ static match_table_t f2fs_tokens = {
{Opt_disable_roll_forward, "disable_roll_forward"}, {Opt_disable_roll_forward, "disable_roll_forward"},
{Opt_norecovery, "norecovery"}, {Opt_norecovery, "norecovery"},
{Opt_discard, "discard"}, {Opt_discard, "discard"},
{Opt_nodiscard, "nodiscard"},
{Opt_noheap, "no_heap"}, {Opt_noheap, "no_heap"},
{Opt_user_xattr, "user_xattr"}, {Opt_user_xattr, "user_xattr"},
{Opt_nouser_xattr, "nouser_xattr"}, {Opt_nouser_xattr, "nouser_xattr"},
...@@ -426,6 +428,8 @@ static int parse_options(struct super_block *sb, char *options) ...@@ -426,6 +428,8 @@ static int parse_options(struct super_block *sb, char *options)
"the device does not support discard"); "the device does not support discard");
} }
break; break;
case Opt_nodiscard:
clear_opt(sbi, DISCARD);
case Opt_noheap: case Opt_noheap:
set_opt(sbi, NOHEAP); set_opt(sbi, NOHEAP);
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册