NVMf initiator persistent across boots
Johannes Thumshirn
jthumshirn at suse.de
Thu Mar 8 23:52:35 PST 2018
On Thu, Mar 08, 2018 at 07:04:17PM +0200, Max Gurtovoy wrote:
> diff --git a/fabrics.c b/fabrics.c
> index 4bdaaf2..774d5dc 100644
> --- a/fabrics.c
> +++ b/fabrics.c
> @@ -614,6 +614,14 @@ static int connect_ctrl(struct nvmf_disc_rsp_page_entry
> *e)
> p += len;
> }
>
> + if (cfg.host_traddr) {
> + len = sprintf(p, ",host_traddr=%s", cfg.host_traddr);
> + if (len < 0)
> + return -EINVAL;
> + p+= len;
> + }
> +
> +
> switch (e->trtype) {
> case NVMF_TRTYPE_LOOP: /* loop */
> len = sprintf(p, ",transport=loop");
> @@ -659,11 +667,6 @@ static int connect_ctrl(struct nvmf_disc_rsp_page_entry
> *e)
> return -EINVAL;
> p += len;
>
> - len = sprintf(p, ",host_traddr=%s",
> cfg.host_traddr);
> - if (len < 0)
> - return -EINVAL;
> - p+= len;
> -
> len = sprintf(p, ",traddr=%.*s",
> space_strip_len(NVMF_TRADDR_SIZE,
> e->traddr),
> e->traddr);
>
>
> thoughts ?
Looks good to me.
--
Johannes Thumshirn Storage
jthumshirn at suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
More information about the Linux-nvme
mailing list