]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: BCH_RECOVERY_PASS_NO_RATELIMIT
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 31 May 2025 17:01:44 +0000 (13:01 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 2 Jun 2025 16:16:36 +0000 (12:16 -0400)
commit0942b852d4070e448231d2e204ac82ad47f5920a
tree9354ca9262d85c34b09ff71955fd478515749003
parenta2ffab0e659831761443f3ae6341c30e845dce43
bcachefs: BCH_RECOVERY_PASS_NO_RATELIMIT

Add a superblock flag to temporarily disable ratelimiting for a recovery
pass.

This will be used to make check_key_has_snapshot safer: we don't want to
delete a key for a missing snapshot unless we know that the snapshots
and subvolumes btrees are consistent, i.e. check_snapshots and
check_subvols have run recently.

Changing those btrees - creating/deleting a subvolume or snapshot - will
set the "disable ratelimit" flag, i.e. ensuring that those passes run if
check_key_has_snapshot discovers an error.

We're only disabling ratelimiting in the snapshot/subvol delete paths,
we're not so concerned about the create paths.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/recovery_passes.c
fs/bcachefs/recovery_passes.h
fs/bcachefs/recovery_passes_format.h
fs/bcachefs/snapshot.c
fs/bcachefs/subvolume.c