Re: [PATCH] null_blk: allow teardown on request timeout

From: Bart Van Assche
Date: Mon Oct 17 2022 - 10:21:41 EST


On 10/15/22 22:20, Chaitanya Kulkarni wrote:
In current timeout implementation null_blk just completes the request
with error=BLK_STS_TIMEOUT without doing any cleanup, hence device
cleanup code including handling inflight requests on timeout and
teardown is never exercised.

Hi Chaitanya,

How about removing that code instead of adding a mechanism for triggering it?

Add a module parameter rq_abort_limit to allow null_blk perform device
cleanup when time out occurs. The non zero value of this parameter
allows user to set the number of timeouts to occur before triggering
cleanup/teardown work.

As Ming Lei wrote, there are no other block drivers that destroy themselves if a certain number of timeouts occur. It seems weird to me to trigger self-removal from inside a timeout handler.

Thanks,

Bart.