From: Kent Overstreet Date: Mon, 15 Jan 2024 20:06:43 +0000 (-0500) Subject: bcachefs: Add missing bch2_moving_ctxt_flush_all() X-Git-Tag: v6.7.5~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a269387a0a962f9eb7c5974409ec6cdb390fc50;p=thirdparty%2Fkernel%2Fstable.git bcachefs: Add missing bch2_moving_ctxt_flush_all() commit ef740a1e2939376ea4cc11cc8b923214dc1f4a41 upstream. This fixes a bug with rebalance IOs getting stuck with reads completed, but writes never being issued. Signed-off-by: Kent Overstreet Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/bcachefs/rebalance.c b/fs/bcachefs/rebalance.c index ba2606a067d01..dd6fed2581003 100644 --- a/fs/bcachefs/rebalance.c +++ b/fs/bcachefs/rebalance.c @@ -356,6 +356,7 @@ static int do_rebalance(struct moving_context *ctxt) !kthread_should_stop() && !atomic64_read(&r->work_stats.sectors_seen) && !atomic64_read(&r->scan_stats.sectors_seen)) { + bch2_moving_ctxt_flush_all(ctxt); bch2_trans_unlock_long(trans); rebalance_wait(c); }