From 3591d4f4e8d3c1f16abfc37eac151ef978cf3b09 Mon Sep 17 00:00:00 2001 From: Ryusuke Konishi Date: Mon, 5 Jul 2010 13:00:08 +0900 Subject: [PATCH] --- yaml --- r: 206345 b: refs/heads/master c: 773bc4f3b6898634a80a41c72a1f34cb89992dcd h: refs/heads/master i: 206343: 0f830548da00a49d5d0a8c64c11f2894a70e5773 v: v3 --- [refs] | 2 +- trunk/Documentation/filesystems/nilfs2.txt | 5 ++++- trunk/fs/nilfs2/super.c | 6 +++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 9fd0f96d3951..ca72e88bff82 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 325020477a51ffa849418b3e38189fd266f2ae20 +refs/heads/master: 773bc4f3b6898634a80a41c72a1f34cb89992dcd diff --git a/trunk/Documentation/filesystems/nilfs2.txt b/trunk/Documentation/filesystems/nilfs2.txt index d3e7673995eb..54f61c0ff442 100644 --- a/trunk/Documentation/filesystems/nilfs2.txt +++ b/trunk/Documentation/filesystems/nilfs2.txt @@ -49,7 +49,10 @@ Mount options NILFS2 supports the following mount options: (*) == default -nobarrier Disables barriers. +barrier(*) This enables/disables the use of write barriers. This +nobarrier requires an IO stack which can support barriers, and + if nilfs gets an error on a barrier write, it will + disable again with a warning. errors=continue Keep going on a filesystem error. errors=remount-ro(*) Remount the filesystem read-only on an error. errors=panic Panic and halt the machine if an error occurs. diff --git a/trunk/fs/nilfs2/super.c b/trunk/fs/nilfs2/super.c index f2cfbbab2346..13b0e955c028 100644 --- a/trunk/fs/nilfs2/super.c +++ b/trunk/fs/nilfs2/super.c @@ -603,7 +603,7 @@ static const struct export_operations nilfs_export_ops = { enum { Opt_err_cont, Opt_err_panic, Opt_err_ro, - Opt_nobarrier, Opt_snapshot, Opt_order, Opt_norecovery, + Opt_barrier, Opt_nobarrier, Opt_snapshot, Opt_order, Opt_norecovery, Opt_discard, Opt_err, }; @@ -611,6 +611,7 @@ static match_table_t tokens = { {Opt_err_cont, "errors=continue"}, {Opt_err_panic, "errors=panic"}, {Opt_err_ro, "errors=remount-ro"}, + {Opt_barrier, "barrier"}, {Opt_nobarrier, "nobarrier"}, {Opt_snapshot, "cp=%u"}, {Opt_order, "order=%s"}, @@ -636,6 +637,9 @@ static int parse_options(char *options, struct super_block *sb) token = match_token(p, tokens, args); switch (token) { + case Opt_barrier: + nilfs_set_opt(sbi, BARRIER); + break; case Opt_nobarrier: nilfs_clear_opt(sbi, BARRIER); break;