aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2016-01-18 21:23:02 -0500
committerDavid Sterba <dsterba@suse.com>2016-02-12 09:14:14 -0500
commit8dcddfa048de637c8bbfa20ffd22757aeab7c604 (patch)
treed8d9ec6222a0334698ab8443888ab21f7dcb9ce4 /fs/btrfs/disk-io.c
parent388f7b1d6e8ca06762e2454d28d6c3c55ad0fe95 (diff)
btrfs: Introduce new mount option usebackuproot to replace recovery
Current "recovery" mount option will only try to use backup root. However the word "recovery" is too generic and may be confusing for some users. Here introduce a new and more specific mount option, "usebackuproot" to replace "recovery" mount option. "Recovery" will be kept for compatibility reason, but will be deprecated. Also, since "usebackuproot" will only affect mount behavior and after open_ctree() it has nothing to do with the filesystem, so clear the flag after mount succeeded. This provides the basis for later unified "norecovery" mount option. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> [ dropped usebackuproot from show_mount, added note about 'recovery' to docs ] Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 4545e2e2ad45..c0363626c5da 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3146,6 +3146,12 @@ retry_root_backup:
3146 3146
3147 fs_info->open = 1; 3147 fs_info->open = 1;
3148 3148
3149 /*
3150 * backuproot only affect mount behavior, and if open_ctree succeeded,
3151 * no need to keep the flag
3152 */
3153 btrfs_clear_opt(fs_info->mount_opt, USEBACKUPROOT);
3154
3149 return 0; 3155 return 0;
3150 3156
3151fail_qgroup: 3157fail_qgroup:
@@ -3200,7 +3206,7 @@ fail:
3200 return err; 3206 return err;
3201 3207
3202recovery_tree_root: 3208recovery_tree_root:
3203 if (!btrfs_test_opt(tree_root, RECOVERY)) 3209 if (!btrfs_test_opt(tree_root, USEBACKUPROOT))
3204 goto fail_tree_roots; 3210 goto fail_tree_roots;
3205 3211
3206 free_root_pointers(fs_info, 0); 3212 free_root_pointers(fs_info, 0);