aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2013-08-15 11:11:24 -0400
committerChris Mason <chris.mason@fusionio.com>2013-09-01 08:15:59 -0400
commitf420ee1e923b931eeef5e2928791e84b1197cab3 (patch)
tree11c4273d3ff3a08d18587fb3ae1f9b156e35d12c /fs/btrfs/super.c
parent70f801754728017ebc909d603c69255dc1e6f06f (diff)
Btrfs: add mount option to force UUID tree checking
This should never be needed, but since all functions are there to check and rebuild the UUID tree, a mount option is added that allows to force this check and rebuild procedure. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 1bd0bb523660..57090b4284fe 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -321,7 +321,7 @@ enum {
321 Opt_enospc_debug, Opt_subvolrootid, Opt_defrag, Opt_inode_cache, 321 Opt_enospc_debug, Opt_subvolrootid, Opt_defrag, Opt_inode_cache,
322 Opt_no_space_cache, Opt_recovery, Opt_skip_balance, 322 Opt_no_space_cache, Opt_recovery, Opt_skip_balance,
323 Opt_check_integrity, Opt_check_integrity_including_extent_data, 323 Opt_check_integrity, Opt_check_integrity_including_extent_data,
324 Opt_check_integrity_print_mask, Opt_fatal_errors, 324 Opt_check_integrity_print_mask, Opt_fatal_errors, Opt_rescan_uuid_tree,
325 Opt_commit_interval, 325 Opt_commit_interval,
326 Opt_err, 326 Opt_err,
327}; 327};
@@ -362,6 +362,7 @@ static match_table_t tokens = {
362 {Opt_check_integrity, "check_int"}, 362 {Opt_check_integrity, "check_int"},
363 {Opt_check_integrity_including_extent_data, "check_int_data"}, 363 {Opt_check_integrity_including_extent_data, "check_int_data"},
364 {Opt_check_integrity_print_mask, "check_int_print_mask=%d"}, 364 {Opt_check_integrity_print_mask, "check_int_print_mask=%d"},
365 {Opt_rescan_uuid_tree, "rescan_uuid_tree"},
365 {Opt_fatal_errors, "fatal_errors=%s"}, 366 {Opt_fatal_errors, "fatal_errors=%s"},
366 {Opt_commit_interval, "commit=%d"}, 367 {Opt_commit_interval, "commit=%d"},
367 {Opt_err, NULL}, 368 {Opt_err, NULL},
@@ -572,6 +573,9 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
572 case Opt_space_cache: 573 case Opt_space_cache:
573 btrfs_set_opt(info->mount_opt, SPACE_CACHE); 574 btrfs_set_opt(info->mount_opt, SPACE_CACHE);
574 break; 575 break;
576 case Opt_rescan_uuid_tree:
577 btrfs_set_opt(info->mount_opt, RESCAN_UUID_TREE);
578 break;
575 case Opt_no_space_cache: 579 case Opt_no_space_cache:
576 printk(KERN_INFO "btrfs: disabling disk space caching\n"); 580 printk(KERN_INFO "btrfs: disabling disk space caching\n");
577 btrfs_clear_opt(info->mount_opt, SPACE_CACHE); 581 btrfs_clear_opt(info->mount_opt, SPACE_CACHE);
@@ -979,6 +983,8 @@ static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry)
979 seq_puts(seq, ",space_cache"); 983 seq_puts(seq, ",space_cache");
980 else 984 else
981 seq_puts(seq, ",nospace_cache"); 985 seq_puts(seq, ",nospace_cache");
986 if (btrfs_test_opt(root, RESCAN_UUID_TREE))
987 seq_puts(seq, ",rescan_uuid_tree");
982 if (btrfs_test_opt(root, CLEAR_CACHE)) 988 if (btrfs_test_opt(root, CLEAR_CACHE))
983 seq_puts(seq, ",clear_cache"); 989 seq_puts(seq, ",clear_cache");
984 if (btrfs_test_opt(root, USER_SUBVOL_RM_ALLOWED)) 990 if (btrfs_test_opt(root, USER_SUBVOL_RM_ALLOWED))