From: Kent Overstreet Date: Thu, 11 Jul 2024 18:08:38 +0000 (-0400) Subject: bcachefs: Print allocator stuck on timeout in fallocate path X-Git-Tag: io_uring-6.11-20240722~28^2~119 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=3de8fd4a33c9caf5ca798373800a37e4f206d8ed;p=linux-block.git bcachefs: Print allocator stuck on timeout in fallocate path same as in io_write.c, if we're waiting on the allocator for an excessive amount of time, print what's going on Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/io_misc.c b/fs/bcachefs/io_misc.c index 4583c9386e8c..2cf6297756f8 100644 --- a/fs/bcachefs/io_misc.c +++ b/fs/bcachefs/io_misc.c @@ -126,7 +126,11 @@ err_noprint: if (closure_nr_remaining(&cl) != 1) { bch2_trans_unlock_long(trans); - closure_sync(&cl); + + if (closure_sync_timeout(&cl, HZ * 10)) { + bch2_print_allocator_stuck(c); + closure_sync(&cl); + } } return ret;