summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-01-15 21:06:43 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-21 19:27:09 +0100
commitef740a1e2939376ea4cc11cc8b923214dc1f4a41 (patch)
tree9eb08277400567ebd95f88ea27c84af57c61539e
parentbcachefs: Re-add move_extent_write tracepoint (diff)
downloadlinux-ef740a1e2939376ea4cc11cc8b923214dc1f4a41.tar.xz
linux-ef740a1e2939376ea4cc11cc8b923214dc1f4a41.zip
bcachefs: Add missing bch2_moving_ctxt_flush_all()
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>
-rw-r--r--fs/bcachefs/rebalance.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/rebalance.c b/fs/bcachefs/rebalance.c
index 95f46cb3b5bd..a729682d653d 100644
--- a/fs/bcachefs/rebalance.c
+++ b/fs/bcachefs/rebalance.c
@@ -371,6 +371,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);
}