aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/filesystems/nilfs2.txt5
-rw-r--r--fs/nilfs2/super.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/Documentation/filesystems/nilfs2.txt b/Documentation/filesystems/nilfs2.txt
index d3e7673995eb..54f61c0ff442 100644
--- a/Documentation/filesystems/nilfs2.txt
+++ b/Documentation/filesystems/nilfs2.txt
@@ -49,7 +49,10 @@ Mount options
49NILFS2 supports the following mount options: 49NILFS2 supports the following mount options:
50(*) == default 50(*) == default
51 51
52nobarrier Disables barriers. 52barrier(*) This enables/disables the use of write barriers. This
53nobarrier requires an IO stack which can support barriers, and
54 if nilfs gets an error on a barrier write, it will
55 disable again with a warning.
53errors=continue Keep going on a filesystem error. 56errors=continue Keep going on a filesystem error.
54errors=remount-ro(*) Remount the filesystem read-only on an error. 57errors=remount-ro(*) Remount the filesystem read-only on an error.
55errors=panic Panic and halt the machine if an error occurs. 58errors=panic Panic and halt the machine if an error occurs.
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
604enum { 604enum {
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;