From 2fd3f6a2711b6986c0fbfa1b3a8e91a778830c10 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Fri, 3 Jul 2026 19:16:07 +0930 Subject: [PATCH] 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 Reviewed-by: Neal Gompa Signed-off-by: Qu Wenruo Signed-off-by: David Sterba --- fs/btrfs/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 11806591e077..1919f42dfb24 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -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'",