aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <[email protected]>2024-07-11 14:08:38 -0400
committerKent Overstreet <[email protected]>2024-07-14 19:00:11 -0400
commit3de8fd4a33c9caf5ca798373800a37e4f206d8ed (patch)
tree65440bf31210f845a0bd08fa0be204d9bb549799
parent0c3836482481200ead7b416ca80c68a29cfdaabd (diff)
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 <[email protected]>
-rw-r--r--fs/bcachefs/io_misc.c6
1 files changed, 5 insertions, 1 deletions
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;