From: Kent Overstreet Date: Fri, 23 Aug 2024 21:38:41 +0000 (-0400) Subject: bcachefs: Fix failure to flush moves before sleeping in copygc X-Git-Tag: microblaze-v6.13~9^2~147 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=d3204616a67e53fdcad14c7026869330fb382fd4;p=linux-2.6-microblaze.git bcachefs: Fix failure to flush moves before sleeping in copygc This fixes an apparent deadlock - rebalance would get stuck trying to take nocow locks because they weren't being released by copygc. Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/movinggc.c b/fs/bcachefs/movinggc.c index deef4f024d20..d86565bf07c8 100644 --- a/fs/bcachefs/movinggc.c +++ b/fs/bcachefs/movinggc.c @@ -383,7 +383,7 @@ static int bch2_copygc_thread(void *arg) if (min_member_capacity == U64_MAX) min_member_capacity = 128 * 2048; - bch2_trans_unlock_long(ctxt.trans); + move_buckets_wait(&ctxt, buckets, true); bch2_kthread_io_clock_wait(clock, last + (min_member_capacity >> 6), MAX_SCHEDULE_TIMEOUT); }