nvme-cli ‘nvme connect’ --duplicate-connect flag (-D) is not supported anymore

Daniel Wagner dwagner at suse.de
Wed Apr 3 05:48:20 PDT 2024


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?

Thanks,
Daniel



More information about the Linux-nvme mailing list