bcachefs: Bail out early on alloc_nowait data updates
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 19 Jan 2025 18:55:33 +0000 (13:55 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 15 Mar 2025 01:02:11 +0000 (21:02 -0400)
commit7e9ed60f5fe58dd4b4b6dcf63e57154c6262a2af
tree623543adf499b31adf6d1c1f4960901defa79c1e
parentc37d42a0e2be210e4e9b60a5a1092e1f139b64a0
bcachefs: Bail out early on alloc_nowait data updates

If a data update doesn't want to block on allocations (promotes, self
healing on read error) - check if the allocation would fail before
kicking off the data update and calling into the write path.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_foreground.c
fs/bcachefs/alloc_foreground.h
fs/bcachefs/data_update.c
fs/bcachefs/errcode.h