[PATCH v2 2/3] btrfs: add "rescue=usebackuproot" into "rescue=all" shortcut

Qu Wenruo <[email protected]>
Newsgroups org.kernel.vger.linux-btrfs
Message-ID <086c4903d40c9b70ea3be0a738992c650915d57f.1783068013.git.wqu@suse.com>
The mount option "rescue=all" should be a shortcut to include all
"rescue=" mount options. but unfortunately "rescue=usebackuproot" is not
include.

Include that option so "rescue=all" have a better chance to mount a
corrupted fs.

Signed-off-by: Qu Wenruo <[email protected]>
---
 fs/btrfs/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index fef9025a2f76..742f646ec12c 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -620,6 +620,7 @@ static int btrfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
 			btrfs_set_opt(ctx->mount_opt, IGNORESUPERFLAGS);
 			btrfs_set_opt(ctx->mount_opt, IGNOREBADROOTS);
 			btrfs_set_opt(ctx->mount_opt, NOLOGREPLAY);
+			btrfs_set_opt(ctx->mount_opt, USEBACKUPROOT);
 			break;
 		default:
 			btrfs_info(NULL, "unrecognized rescue option '%s'",
-- 
2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.