Commit 7ee88737 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Check for bad needs_discard before doing discard



In the discard worker, we were failing to validate the bucket state -
meaning a corrupt needs_discard btree could cause us to discard a bucket
that we shouldn't.

If check_alloc_info hasn't run yet we just want to bail out, otherwise
it's a filesystem inconsistent error.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent e0319af2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment