diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-07-05 00:00:08 -0400 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-07-22 21:02:12 -0400 |
commit | 773bc4f3b6898634a80a41c72a1f34cb89992dcd (patch) | |
tree | ee6f12c0fbfa959a79861904498d04db8d899cc2 /fs/nilfs2/super.c | |
parent | 325020477a51ffa849418b3e38189fd266f2ae20 (diff) |
nilfs2: add barrier mount option
Nilfs enables write barriers by default and has "nobarrier" mount
option to disable this feature. But it lacks the complementary option
and has no way to re-enable the feature on remount.
This adds "barrier" option to resolve this imbalance.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/super.c')
-rw-r--r-- | fs/nilfs2/super.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index f2cfbbab2346..13b0e955c028 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c | |||
@@ -603,7 +603,7 @@ static const struct export_operations nilfs_export_ops = { | |||
603 | 603 | ||
604 | enum { | 604 | enum { |
605 | Opt_err_cont, Opt_err_panic, Opt_err_ro, | 605 | Opt_err_cont, Opt_err_panic, Opt_err_ro, |
606 | Opt_nobarrier, Opt_snapshot, Opt_order, Opt_norecovery, | 606 | Opt_barrier, Opt_nobarrier, Opt_snapshot, Opt_order, Opt_norecovery, |
607 | Opt_discard, Opt_err, | 607 | Opt_discard, Opt_err, |
608 | }; | 608 | }; |
609 | 609 | ||
@@ -611,6 +611,7 @@ static match_table_t tokens = { | |||
611 | {Opt_err_cont, "errors=continue"}, | 611 | {Opt_err_cont, "errors=continue"}, |
612 | {Opt_err_panic, "errors=panic"}, | 612 | {Opt_err_panic, "errors=panic"}, |
613 | {Opt_err_ro, "errors=remount-ro"}, | 613 | {Opt_err_ro, "errors=remount-ro"}, |
614 | {Opt_barrier, "barrier"}, | ||
614 | {Opt_nobarrier, "nobarrier"}, | 615 | {Opt_nobarrier, "nobarrier"}, |
615 | {Opt_snapshot, "cp=%u"}, | 616 | {Opt_snapshot, "cp=%u"}, |
616 | {Opt_order, "order=%s"}, | 617 | {Opt_order, "order=%s"}, |
@@ -636,6 +637,9 @@ static int parse_options(char *options, struct super_block *sb) | |||
636 | 637 | ||
637 | token = match_token(p, tokens, args); | 638 | token = match_token(p, tokens, args); |
638 | switch (token) { | 639 | switch (token) { |
640 | case Opt_barrier: | ||
641 | nilfs_set_opt(sbi, BARRIER); | ||
642 | break; | ||
639 | case Opt_nobarrier: | 643 | case Opt_nobarrier: |
640 | nilfs_clear_opt(sbi, BARRIER); | 644 | nilfs_clear_opt(sbi, BARRIER); |
641 | break; | 645 | break; |