summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2016-07-03 22:05:14 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2016-07-08 10:33:26 -0700
commit64058be9c8e3579d7055e0b01d2bd9b294db3998 (patch)
tree921726f67456c7723bc6291d9f700a4f0b5a24ba /fs/f2fs
parent72e1c797b57da42ce8f75c5636720f40c4f607a2 (diff)
downloadlinux-64058be9c8e3579d7055e0b01d2bd9b294db3998.tar.gz
linux-64058be9c8e3579d7055e0b01d2bd9b294db3998.tar.bz2
linux-64058be9c8e3579d7055e0b01d2bd9b294db3998.zip
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>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/super.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 8c698e183d2b..e0a975dc6fc6 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -76,6 +76,7 @@ enum {
Opt_disable_roll_forward,
Opt_norecovery,
Opt_discard,
+ Opt_nodiscard,
Opt_noheap,
Opt_user_xattr,
Opt_nouser_xattr,
@@ -106,6 +107,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"},
@@ -426,6 +428,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;