[PATCH] nvme-fabrics: Use shutdown timeout on disconnect

Hannes Reinecke hare at suse.de
Mon Oct 4 06:23:57 PDT 2021


On 10/1/21 1:11 PM, Daniel Wagner wrote:
> On Thu, Sep 30, 2021 at 10:56:34AM -0400, Martin Belanger wrote:
>> @@ -244,8 +257,8 @@ int nvmf_reg_write32(struct nvme_ctrl *ctrl, u32 off, u32 val)
>>   	cmd.prop_set.offset = cpu_to_le32(off);
>>   	cmd.prop_set.value = cpu_to_le64(val);
>>   
>> -	ret = __nvme_submit_sync_cmd(ctrl->fabrics_q, &cmd, NULL, NULL, 0, 0,
>> -			NVME_QID_ANY, 0, 0);
>> +	ret = __nvme_submit_sync_cmd(ctrl->fabrics_q, &cmd, NULL, NULL, 0,
>> +				     timeout, NVME_QID_ANY, 0, 0);
> 
> If I am not mistaken nvmf_connect_io_queue() suffers from the same
> problem.
> 
Hmm. Not a big fan, I must admit.

If the controller is _not_ live we cannot send commands. And especially 
if the controller is in DELETING I really can't see how we _could_ send 
commands at all.

Wouldn't it be better to ensure that __nvme_submit_sync_cmd() returns an 
appropriate error?

Cheers,

Hannes



More information about the Linux-nvme mailing list