[PATCH v3 7/9] nvme-rdma: serialize controller teardown sequences
James Smart
james.smart at broadcom.com
Fri Aug 21 17:08:23 EDT 2020
On 8/19/2020 10:36 PM, Sagi Grimberg wrote:
> In the timeout handler we may need to complete a request because the
> request that timed out may be an I/O that is a part of a serial sequence
> of controller teardown or initialization. In order to complete the
> request, we need to fence any other context that may compete with us
> and complete the request that is timing out.
>
> In this case, we could have a potential double completion in case
> a hard-irq or a different competing context triggered error recovery
> and is running inflight request cancellation concurrently with the
> timeout handler.
>
> Protect using a ctrl teardown_lock to serialize contexts that may
> complete a cancelled request due to error recovery or a reset.
>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
> ---
> drivers/nvme/host/rdma.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
>
Reviewed-by: James Smart <james.smart at broadcom.com>
yes, it looks better. the reworked eh handler definitely helps.
-- james
More information about the Linux-nvme
mailing list