diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-07-23 12:57:31 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-07-29 08:27:48 -0400 |
commit | 0f7b2abd188089a44f60e2bf8521d1363ada9e12 (patch) | |
tree | b03702e8aadcf265bb796c3ec31413ea081fb136 /fs/f2fs/super.c | |
parent | 9d847950770da7102d4efc02d0939ce28e3a7dd0 (diff) |
f2fs: add nobarrier mount option
This patch adds a mount option, nobarrier, in f2fs.
The assumption in here is that file system keeps the IO ordering, but
doesn't care about cache flushes inside the storages.
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r-- | fs/f2fs/super.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 34649aa66e04..93593ceec175 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c | |||
@@ -52,6 +52,7 @@ enum { | |||
52 | Opt_inline_xattr, | 52 | Opt_inline_xattr, |
53 | Opt_inline_data, | 53 | Opt_inline_data, |
54 | Opt_flush_merge, | 54 | Opt_flush_merge, |
55 | Opt_nobarrier, | ||
55 | Opt_err, | 56 | Opt_err, |
56 | }; | 57 | }; |
57 | 58 | ||
@@ -69,6 +70,7 @@ static match_table_t f2fs_tokens = { | |||
69 | {Opt_inline_xattr, "inline_xattr"}, | 70 | {Opt_inline_xattr, "inline_xattr"}, |
70 | {Opt_inline_data, "inline_data"}, | 71 | {Opt_inline_data, "inline_data"}, |
71 | {Opt_flush_merge, "flush_merge"}, | 72 | {Opt_flush_merge, "flush_merge"}, |
73 | {Opt_nobarrier, "nobarrier"}, | ||
72 | {Opt_err, NULL}, | 74 | {Opt_err, NULL}, |
73 | }; | 75 | }; |
74 | 76 | ||
@@ -339,6 +341,9 @@ static int parse_options(struct super_block *sb, char *options) | |||
339 | case Opt_flush_merge: | 341 | case Opt_flush_merge: |
340 | set_opt(sbi, FLUSH_MERGE); | 342 | set_opt(sbi, FLUSH_MERGE); |
341 | break; | 343 | break; |
344 | case Opt_nobarrier: | ||
345 | set_opt(sbi, NOBARRIER); | ||
346 | break; | ||
342 | default: | 347 | default: |
343 | f2fs_msg(sb, KERN_ERR, | 348 | f2fs_msg(sb, KERN_ERR, |
344 | "Unrecognized mount option \"%s\" or missing value", | 349 | "Unrecognized mount option \"%s\" or missing value", |
@@ -544,6 +549,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root) | |||
544 | seq_puts(seq, ",inline_data"); | 549 | seq_puts(seq, ",inline_data"); |
545 | if (!f2fs_readonly(sbi->sb) && test_opt(sbi, FLUSH_MERGE)) | 550 | if (!f2fs_readonly(sbi->sb) && test_opt(sbi, FLUSH_MERGE)) |
546 | seq_puts(seq, ",flush_merge"); | 551 | seq_puts(seq, ",flush_merge"); |
552 | if (test_opt(sbi, NOBARRIER)) | ||
553 | seq_puts(seq, ",nobarrier"); | ||
547 | seq_printf(seq, ",active_logs=%u", sbi->active_logs); | 554 | seq_printf(seq, ",active_logs=%u", sbi->active_logs); |
548 | 555 | ||
549 | return 0; | 556 | return 0; |