]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
bcachefs: Add missing bch2_moving_ctxt_flush_all()
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 15 Jan 2024 20:06:43 +0000 (15:06 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2024 18:14:30 +0000 (19:14 +0100)
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 <kent.overstreet@linux.dev>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/bcachefs/rebalance.c

index ba2606a067d018e22f7b31ec52a50d47e81a43ed..dd6fed25810034e270c726b14c84e655a4857a1e 100644 (file)
@@ -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);
        }