diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/f2fs/super.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 146e310fbf04..06d903b5d6c8 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c | |||
@@ -42,6 +42,7 @@ static struct kset *f2fs_kset; | |||
42 | enum { | 42 | enum { |
43 | Opt_gc_background, | 43 | Opt_gc_background, |
44 | Opt_disable_roll_forward, | 44 | Opt_disable_roll_forward, |
45 | Opt_norecovery, | ||
45 | Opt_discard, | 46 | Opt_discard, |
46 | Opt_noheap, | 47 | Opt_noheap, |
47 | Opt_user_xattr, | 48 | Opt_user_xattr, |
@@ -62,6 +63,7 @@ enum { | |||
62 | static match_table_t f2fs_tokens = { | 63 | static match_table_t f2fs_tokens = { |
63 | {Opt_gc_background, "background_gc=%s"}, | 64 | {Opt_gc_background, "background_gc=%s"}, |
64 | {Opt_disable_roll_forward, "disable_roll_forward"}, | 65 | {Opt_disable_roll_forward, "disable_roll_forward"}, |
66 | {Opt_norecovery, "norecovery"}, | ||
65 | {Opt_discard, "discard"}, | 67 | {Opt_discard, "discard"}, |
66 | {Opt_noheap, "no_heap"}, | 68 | {Opt_noheap, "no_heap"}, |
67 | {Opt_user_xattr, "user_xattr"}, | 69 | {Opt_user_xattr, "user_xattr"}, |
@@ -287,6 +289,12 @@ static int parse_options(struct super_block *sb, char *options) | |||
287 | case Opt_disable_roll_forward: | 289 | case Opt_disable_roll_forward: |
288 | set_opt(sbi, DISABLE_ROLL_FORWARD); | 290 | set_opt(sbi, DISABLE_ROLL_FORWARD); |
289 | break; | 291 | break; |
292 | case Opt_norecovery: | ||
293 | /* this option mounts f2fs with ro */ | ||
294 | set_opt(sbi, DISABLE_ROLL_FORWARD); | ||
295 | if (!f2fs_readonly(sb)) | ||
296 | return -EINVAL; | ||
297 | break; | ||
290 | case Opt_discard: | 298 | case Opt_discard: |
291 | set_opt(sbi, DISCARD); | 299 | set_opt(sbi, DISCARD); |
292 | break; | 300 | break; |