diff options
author | Sage Weil <sage@newdream.net> | 2009-04-02 16:49:40 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-04-02 16:49:40 -0400 |
commit | 3a5e14048a0a81276d284cbda441507a17e26147 (patch) | |
tree | 42464c2455216b008bf27c13496d001bb85d3564 /fs/btrfs/super.c | |
parent | a9572a15a854bd40453a6b7b4dd9d29132f64c64 (diff) | |
download | kernel-crypto-3a5e14048a0a81276d284cbda441507a17e26147.tar.gz kernel-crypto-3a5e14048a0a81276d284cbda441507a17e26147.tar.xz kernel-crypto-3a5e14048a0a81276d284cbda441507a17e26147.zip |
Btrfs: notreelog mount option
Add a 'notreelog' mount option to disable the tree log (used by fsync,
O_SYNC writes). This is much slower, but the tree logging produces
inconsistent views into the FS for ceph.
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 2ceb40b794a..3baa2c109e5 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -67,7 +67,8 @@ static void btrfs_put_super(struct super_block *sb) enum { Opt_degraded, Opt_subvol, Opt_device, Opt_nodatasum, Opt_nodatacow, Opt_max_extent, Opt_max_inline, Opt_alloc_start, Opt_nobarrier, - Opt_ssd, Opt_thread_pool, Opt_noacl, Opt_compress, Opt_err, + Opt_ssd, Opt_thread_pool, Opt_noacl, Opt_compress, Opt_notreelog, + Opt_err, }; static match_table_t tokens = { @@ -84,6 +85,7 @@ static match_table_t tokens = { {Opt_compress, "compress"}, {Opt_ssd, "ssd"}, {Opt_noacl, "noacl"}, + {Opt_notreelog, "notreelog"}, {Opt_err, NULL}, }; @@ -223,6 +225,10 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) case Opt_noacl: root->fs_info->sb->s_flags &= ~MS_POSIXACL; break; + case Opt_notreelog: + printk(KERN_INFO "btrfs: disabling tree log\n"); + btrfs_set_opt(info->mount_opt, NOTREELOG); + break; default: break; } @@ -412,6 +418,8 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs) seq_puts(seq, ",compress"); if (btrfs_test_opt(root, SSD)) seq_puts(seq, ",ssd"); + if (btrfs_test_opt(root, NOTREELOG)) + seq_puts(seq, ",notreelog"); if (!(root->fs_info->sb->s_flags & MS_POSIXACL)) seq_puts(seq, ",noacl"); return 0; |