commit | 7ee88737ab802ac832f978d6e6258571fe08d870 | [log] [tgz] |
---|---|---|
author | Kent Overstreet <kent.overstreet@linux.dev> | Tue Apr 02 18:30:14 2024 -0400 |
committer | Kent Overstreet <kent.overstreet@linux.dev> | Tue Apr 02 20:24:00 2024 -0400 |
tree | cea43d70c963bf7c4bba92a6d9fdf764ae304f74 | |
parent | e0319af2b6cdfa7c39edf73dcb813b7ff1261fa5 [diff] |
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: Kent Overstreet <kent.overstreet@linux.dev>