diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-07-11 21:08:38 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-07-15 02:00:11 +0300 |
commit | 3de8fd4a33c9caf5ca798373800a37e4f206d8ed (patch) | |
tree | 65440bf31210f845a0bd08fa0be204d9bb549799 /fs/bcachefs/io_misc.c | |
parent | 0c3836482481200ead7b416ca80c68a29cfdaabd (diff) | |
download | linux-3de8fd4a33c9caf5ca798373800a37e4f206d8ed.tar.xz |
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 <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/io_misc.c')
-rw-r--r-- | fs/bcachefs/io_misc.c | 6 |
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; |