bcachefs: bch2_kthread_io_clock_wait() no longer sleeps until full amount
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 15 Jan 2024 19:15:26 +0000 (14:15 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 21 Jan 2024 18:27:09 +0000 (13:27 -0500)
commitd92b83f592d810aded2e5f90db5f560cc8cf577b
tree6f1e09ed5dddae7fbe8b1d8fec6f0ecb306a119c
parent741c1d3ec1a4a91d0bf18f200e2f0f8bed1ee7e9
bcachefs: bch2_kthread_io_clock_wait() no longer sleeps until full amount

Drop t he loop in bch2_kthread_io_clock_wait(): this allows the code
that uses it to be woken up for other reasons, and fixes a bug where
rebalance wouldn't wake up when a scan was requested.

This raises the possibility of spurious wakeups, but callers should
always be able to handle that reasonably well.

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