aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-04-02 16:49:40 -0400
committerChris Mason <chris.mason@oracle.com>2009-04-02 16:49:40 -0400
commit3a5e14048a0a81276d284cbda441507a17e26147 (patch)
tree42464c2455216b008bf27c13496d001bb85d3564 /fs/btrfs/super.c
parenta9572a15a854bd40453a6b7b4dd9d29132f64c64 (diff)
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.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 2ceb40b794a8..3baa2c109e55 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -67,7 +67,8 @@ static void btrfs_put_super(struct super_block *sb)
67enum { 67enum {
68 Opt_degraded, Opt_subvol, Opt_device, Opt_nodatasum, Opt_nodatacow, 68 Opt_degraded, Opt_subvol, Opt_device, Opt_nodatasum, Opt_nodatacow,
69 Opt_max_extent, Opt_max_inline, Opt_alloc_start, Opt_nobarrier, 69 Opt_max_extent, Opt_max_inline, Opt_alloc_start, Opt_nobarrier,
70 Opt_ssd, Opt_thread_pool, Opt_noacl, Opt_compress, Opt_err, 70 Opt_ssd, Opt_thread_pool, Opt_noacl, Opt_compress, Opt_notreelog,
71 Opt_err,
71}; 72};
72 73
73static match_table_t tokens = { 74static match_table_t tokens = {
@@ -84,6 +85,7 @@ static match_table_t tokens = {
84 {Opt_compress, "compress"}, 85 {Opt_compress, "compress"},
85 {Opt_ssd, "ssd"}, 86 {Opt_ssd, "ssd"},
86 {Opt_noacl, "noacl"}, 87 {Opt_noacl, "noacl"},
88 {Opt_notreelog, "notreelog"},
87 {Opt_err, NULL}, 89 {Opt_err, NULL},
88}; 90};
89 91
@@ -223,6 +225,10 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
223 case Opt_noacl: 225 case Opt_noacl:
224 root->fs_info->sb->s_flags &= ~MS_POSIXACL; 226 root->fs_info->sb->s_flags &= ~MS_POSIXACL;
225 break; 227 break;
228 case Opt_notreelog:
229 printk(KERN_INFO "btrfs: disabling tree log\n");
230 btrfs_set_opt(info->mount_opt, NOTREELOG);
231 break;
226 default: 232 default:
227 break; 233 break;
228 } 234 }
@@ -412,6 +418,8 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
412 seq_puts(seq, ",compress"); 418 seq_puts(seq, ",compress");
413 if (btrfs_test_opt(root, SSD)) 419 if (btrfs_test_opt(root, SSD))
414 seq_puts(seq, ",ssd"); 420 seq_puts(seq, ",ssd");
421 if (btrfs_test_opt(root, NOTREELOG))
422 seq_puts(seq, ",notreelog");
415 if (!(root->fs_info->sb->s_flags & MS_POSIXACL)) 423 if (!(root->fs_info->sb->s_flags & MS_POSIXACL))
416 seq_puts(seq, ",noacl"); 424 seq_puts(seq, ",noacl");
417 return 0; 425 return 0;