Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: fc: provide a descriptive error
@ 2018-04-19 17:43 Johannes Thumshirn
  2018-04-19 21:20 ` James Smart
  2018-04-20  5:43 ` Hannes Reinecke
  0 siblings, 2 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2018-04-19 17:43 UTC (permalink / raw)


Provide a descriptive error in case an lport to rport association
isn't found when creating the FC-NVME controller.

Currently it's very hard to debug the reason for a failed connect
attempt without a look at the source.

Signed-off-by: Johannes Thumshirn <jthumshirn at suse.de>

---
This actually happened to Hannes and me becuase of a typo in a
customer demo today, so yes things like this happen unitl we have a
proper way to do auto-connect.
---
 drivers/nvme/host/fc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index 6cb26bcf6ec0..8b66879b4ebf 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -3284,6 +3284,8 @@ nvme_fc_create_ctrl(struct device *dev, struct nvmf_ctrl_options *opts)
 	}
 	spin_unlock_irqrestore(&nvme_fc_lock, flags);
 
+	pr_warn("%s: %s - %s combination not found\n",
+		__func__, opts->traddr, opts->host_traddr);
 	return ERR_PTR(-ENOENT);
 }
 
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] nvme: fc: provide a descriptive error
  2018-04-19 17:43 [PATCH] nvme: fc: provide a descriptive error Johannes Thumshirn
@ 2018-04-19 21:20 ` James Smart
  2018-04-20  5:43 ` Hannes Reinecke
  1 sibling, 0 replies; 4+ messages in thread
From: James Smart @ 2018-04-19 21:20 UTC (permalink / raw)


On 4/19/2018 10:43 AM, Johannes Thumshirn wrote:
> Provide a descriptive error in case an lport to rport association
> isn't found when creating the FC-NVME controller.
>
> Currently it's very hard to debug the reason for a failed connect
> attempt without a look at the source.
>
> Signed-off-by: Johannes Thumshirn <jthumshirn at suse.de>
>
> ---
> This actually happened to Hannes and me becuase of a typo in a
> customer demo today, so yes things like this happen unitl we have a
> proper way to do auto-connect.
> ---
>   drivers/nvme/host/fc.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> index 6cb26bcf6ec0..8b66879b4ebf 100644
> --- a/drivers/nvme/host/fc.c
> +++ b/drivers/nvme/host/fc.c
> @@ -3284,6 +3284,8 @@ nvme_fc_create_ctrl(struct device *dev, struct nvmf_ctrl_options *opts)
>   	}
>   	spin_unlock_irqrestore(&nvme_fc_lock, flags);
>   
> +	pr_warn("%s: %s - %s combination not found\n",
> +		__func__, opts->traddr, opts->host_traddr);
>   	return ERR_PTR(-ENOENT);
>   }
>   

Signed-off-by:? James Smart? <james.smart at broadcom.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] nvme: fc: provide a descriptive error
  2018-04-19 17:43 [PATCH] nvme: fc: provide a descriptive error Johannes Thumshirn
  2018-04-19 21:20 ` James Smart
@ 2018-04-20  5:43 ` Hannes Reinecke
  2018-04-23 18:24   ` Keith Busch
  1 sibling, 1 reply; 4+ messages in thread
From: Hannes Reinecke @ 2018-04-20  5:43 UTC (permalink / raw)


On 04/19/2018 07:43 PM, Johannes Thumshirn wrote:
> Provide a descriptive error in case an lport to rport association
> isn't found when creating the FC-NVME controller.
> 
> Currently it's very hard to debug the reason for a failed connect
> attempt without a look at the source.
> 
> Signed-off-by: Johannes Thumshirn <jthumshirn at suse.de>
> 
> ---
> This actually happened to Hannes and me because of a typo in a
> customer demo today, so yes things like this happen until we have a
> proper way to do auto-connect.
> ---
>  drivers/nvme/host/fc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> index 6cb26bcf6ec0..8b66879b4ebf 100644
> --- a/drivers/nvme/host/fc.c
> +++ b/drivers/nvme/host/fc.c
> @@ -3284,6 +3284,8 @@ nvme_fc_create_ctrl(struct device *dev, struct nvmf_ctrl_options *opts)
>  	}
>  	spin_unlock_irqrestore(&nvme_fc_lock, flags);
>  
> +	pr_warn("%s: %s - %s combination not found\n",
> +		__func__, opts->traddr, opts->host_traddr);
>  	return ERR_PTR(-ENOENT);
>  }
>  
> 
Reviewed-by: Hannes Reinecke <hare at suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare at suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: F. Imend?rffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG N?rnberg)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] nvme: fc: provide a descriptive error
  2018-04-20  5:43 ` Hannes Reinecke
@ 2018-04-23 18:24   ` Keith Busch
  0 siblings, 0 replies; 4+ messages in thread
From: Keith Busch @ 2018-04-23 18:24 UTC (permalink / raw)


Thanks, staged for 4.18.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-04-23 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-19 17:43 [PATCH] nvme: fc: provide a descriptive error Johannes Thumshirn
2018-04-19 21:20 ` James Smart
2018-04-20  5:43 ` Hannes Reinecke
2018-04-23 18:24   ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox