bcachefs: Don't issue discards when in nochanges mode
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 21 Feb 2022 10:05:29 +0000 (05:05 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:24 +0000 (17:09 -0400)
commit3117db99f30b26ebf09ecc323cbefcd51d83467b
tree11a698224b70620242e2b7a18fde7701e8159374
parent8ccf4dff09e49b34c6ed2e161720634e8dafb99f
bcachefs: Don't issue discards when in nochanges mode

When the nochanges option is selected, we're supposed to never issue
writes. Unfortunately, it seems discards were missed when implemnting
this, leading to some painful filesystem corruption.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/alloc_background.c
fs/bcachefs/journal_reclaim.c