summaryrefslogtreecommitdiffstats
path: root/fs/nilfs2
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-07-05 13:00:08 +0900
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-07-23 10:02:12 +0900
commit773bc4f3b6898634a80a41c72a1f34cb89992dcd (patch)
treeee6f12c0fbfa959a79861904498d04db8d899cc2 /fs/nilfs2
parent325020477a51ffa849418b3e38189fd266f2ae20 (diff)
downloadop-kernel-dev-773bc4f3b6898634a80a41c72a1f34cb89992dcd.zip
op-kernel-dev-773bc4f3b6898634a80a41c72a1f34cb89992dcd.tar.gz
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')
-rw-r--r--fs/nilfs2/super.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index f2cfbba..13b0e95 100644
--- a/fs/nilfs2/super.c
+++ b/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;
OpenPOWER on IntegriCloud