[PATCH v2 7/8] nvme-rdma: fix timeout handler

James Smart james.smart at broadcom.com
Fri Aug 14 19:30:43 EDT 2020



On 8/14/2020 4:27 PM, James Smart wrote:
>
>
> On 8/6/2020 12:11 PM, Sagi Grimberg wrote:
>> Currently we check if the controller state != LIVE, and
>> we directly fail the command under the assumption that this
>> is the connect command or an admin command within the
>> controller initialization sequence.
>>
>> This is wrong, we need to check if the request risking
>> controller setup/teardown blocking if not completed and
>> only then fail.
>>
>> The logic should be:
>> - RESETTING, only fail fabrics/admin commands otherwise
>>    controller teardown will block. otherwise reset the timer
>>    and come back again.
>> - CONNECTING, if this is a connect (or an admin command), we fail
>>    right away (unblock controller initialization), otherwise we
>>    treat it like anything else.
>> - otherwise trigger error recovery and reset the timer (the
>>    error handler will take care of completing/delaying it).
>>
>> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
>> ---
>>   drivers/nvme/host/rdma.c | 68 +++++++++++++++++++++++++++++-----------
>>   1 file changed, 50 insertions(+), 18 deletions(-)
>>
>> diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
>> index abc318737f35..30b401fcc06a 100644

Note: FC has to do this a little differently. From what I can tell, 
there's no cross-overs in your patches vs mine, so no need to wait for 
FC patches to marry with them.

-- james




More information about the Linux-nvme mailing list