Re: [PATCH 12/19] btrfs: expire submit buffer on timeout

From: Damien Le Moal
Date: Sun Jun 16 2019 - 23:24:03 EST

On 2019/06/13 23:15, Josef Bacik wrote:
> On Fri, Jun 07, 2019 at 10:10:18PM +0900, Naohiro Aota wrote:
>> It is possible to have bios stalled in the submit buffer due to some bug or
>> device problem. In such situation, btrfs stops working waiting for buffered
>> bios completions. To avoid such hang, add a worker that will cancel the
>> stalled bios after a timeout.
> The block layer does this with it's request timeouts right? So it'll timeout
> and we'll get an EIO? If that's not working then we need to fix the block
> layer. Thanks,


The block layer timeout is started only when the request is dispatched. The
timeout is not started on BIO/request allocation and so will not trigger for
bios stalled inside btrfs scheduler.

Damien Le Moal
Western Digital Research