bcachefs: don't block reads if we're promoting
authorDaniel Hill <daniel@gluo.nz>
Fri, 6 Jan 2023 08:11:07 +0000 (21:11 +1300)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:52 +0000 (17:09 -0400)
commit3482dd6a250397fe1dc088a16bc9e50d72f217e6
tree8edfedcc8a1ae36e890537e7a41a6918c5fc7d02
parent0093b9e9704cc932363c66b2b072b762771ffe1f
bcachefs: don't block reads if we're promoting

The promote path calls data_update_init() and now that we take locks here,
there's potential for promote to block our read path, just error
when we can't take the lock instead of blocking.

Signed-off-by: Daniel Hill <daniel@gluo.nz>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/data_update.c
fs/bcachefs/errcode.h
fs/bcachefs/io.c