mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
388f7b1d6e
commit
8dcddfa048
4 changed files with 25 additions and 11 deletions
|
@ -3146,6 +3146,12 @@ retry_root_backup:
|
|||
|
||||
fs_info->open = 1;
|
||||
|
||||
/*
|
||||
* backuproot only affect mount behavior, and if open_ctree succeeded,
|
||||
* no need to keep the flag
|
||||
*/
|
||||
btrfs_clear_opt(fs_info->mount_opt, USEBACKUPROOT);
|
||||
|
||||
return 0;
|
||||
|
||||
fail_qgroup:
|
||||
|
@ -3200,7 +3206,7 @@ fail:
|
|||
return err;
|
||||
|
||||
recovery_tree_root:
|
||||
if (!btrfs_test_opt(tree_root, RECOVERY))
|
||||
if (!btrfs_test_opt(tree_root, USEBACKUPROOT))
|
||||
goto fail_tree_roots;
|
||||
|
||||
free_root_pointers(fs_info, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue