Re: [PATCH v4] dm-io: don't warn if flush takes too long time

From: Jens Axboe
Date: Wed Apr 17 2024 - 12:56:17 EST


On 4/17/24 10:51 AM, Mikulas Patocka wrote:
> There was reported hang warning when using dm-integrity on the top of loop
> device on XFS on a rotational disk. The warning was triggered because
> flush on the loop device was too slow.
>
> There's no easy way to reduce the latency, so I made a patch that shuts
> the warning up.
>
> There's already a function blk_wait_io that avoids the hung task warning.
> This commit moves this function from block/blk.h to
> kernel/sched/completion.c, renames it to wait_for_completion_long_io
> (because it is not dependent on the block layer at all) and uses it in
> dm-io instead of wait_for_completion_io.

Looks good to me, though I'd probably split out that dm change as it's a
new addition where the other parts are strictly mechanical (moving the
helper to where it belongs, and using it where we already do it).

--
Jens Axboe