]> git.dujemihanovic.xyz Git - linux.git/commit
bcachefs: Fix missing alloc_data_type_set()
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 20 Jun 2024 14:04:35 +0000 (10:04 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Fri, 21 Jun 2024 14:17:07 +0000 (10:17 -0400)
commitf648b6c12b70af9d24a293617102729cee6b7862
treef2e03d2f8c3da67c07506b3b150a48a87923c038
parent339b84ab6b1d66900c27bd999271cb2ae40ce812
bcachefs: Fix missing alloc_data_type_set()

Incorrect bucket state transition in the discard path; when incrementing
a bucket's generation number that had already been discarded, we were
forgetting to check if it should be need_gc_gens, not free.

This was caught by the .invalid checks in the transaction commit path,
causing us to go emergency read only.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_background.c