btrfs: add "rescue=usebackuproot" into "rescue=all" shortcut

The mount option "rescue=all" should be a shortcut to include all
"rescue=" mount options. But unfortunately "rescue=usebackuproot" is not
included.

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

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2026-07-03 19:16:07 +09:30 committed by David Sterba
parent ce5d6709eb
commit 2fd3f6a271

View File

@ -621,6 +621,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'",