Re: nvme-cli ‘nvme connect’ --duplicate-connect flag (-D) is not supported anymore
Nilay Shroff
nilay at linux.ibm.com
Wed Apr 3 06:27:15 PDT 2024
On 4/3/24 18:18, Daniel Wagner wrote:
> On Wed, Apr 03, 2024 at 06:07:29PM +0530, Nilay Shroff wrote:
>> I think this is a bug in nvme-cli.
>
> Yes, regression from
>
> 07d6b911e081 ("fabrics: Do not attempt to reconnect to already connected
> ctrls")
>
>> If you want to use nvme-cli then you may try this patch:
>>
>> --- a/fabrics.c
>> +++ b/fabrics.c
>> @@ -999,7 +999,7 @@ int nvmf_connect(const char *desc, int argc, char **argv)
>> };
>>
>> c = lookup_ctrl(h, &trcfg);
>> - if (c && nvme_ctrl_get_name(c)) {
>> + if (c && nvme_ctrl_get_name(c) && !cfg.duplicate_connect) {
>> fprintf(stderr, "already connected\n");
>> errno = EALREADY;
>> goto out_free;
>>
>
> Care to send a proper patch?
>
Sorry my bad. I will send a proper patch in next mail.
Thanks,
--Nilay
More information about the Linux-nvme
mailing list