From: Kent Overstreet Date: Fri, 23 May 2025 22:31:53 +0000 (-0400) Subject: bcachefs: Fix opts.recovery_pass_last X-Git-Tag: v6.16-rc1~211^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cade003209cfe728de2ef880d5704cc322a7ce1f;p=thirdparty%2Fkernel%2Flinux.git bcachefs: Fix opts.recovery_pass_last This was lost in the giant recovery pass rework - but it's used heavily by bcachefs subcommand utilities. Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/recovery_passes.c b/fs/bcachefs/recovery_passes.c index f74f14227137b..dabb29b08ad0a 100644 --- a/fs/bcachefs/recovery_passes.c +++ b/fs/bcachefs/recovery_passes.c @@ -525,6 +525,9 @@ int bch2_run_recovery_passes(struct bch_fs *c, enum bch_recovery_pass from) c->opts.recovery_passes | c->sb.recovery_passes_required; + if (c->opts.recovery_pass_last) + passes &= BIT_ULL(c->opts.recovery_pass_last + 1) - 1; + /* * We can't allow set_may_go_rw to be excluded; that would cause us to * use the journal replay keys for updates where it's not expected.