On Wed, 17 Apr 2024, Jens Axboe wrote: > On 4/17/24 3:05 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 > > include/linux/completion.h, 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. > > Change looks fine to me, but while at it, let's just move it into > blk-core.c and make it public, no need for this function to be a static > inline. > > -- > Jens Axboe I think we should move it to ./kernel/sched/completion.c. Because the function has no dependency on the block layer. I'll send a patch that does it. Mikulas