Linux-NVME Archive on lore.kernel.org
 help / color / Atom feed
* Issue With NVME CLI list Command
@ 2019-10-10 19:11 Jeffrey Lien
  2019-10-10 19:23 ` Keith Busch
  0 siblings, 1 reply; 5+ messages in thread
From: Jeffrey Lien @ 2019-10-10 19:11 UTC (permalink / raw)
  To: Keith Busch, linux-nvme

Keith, 
I'm getting a "Failed to scan namespaces" error message back from the "nvme list" command after updating my fork and picking up your changes from Aug 28th.  The cause of the failure is the following check in the function verify_legacy_ns (in nvme-topology.c):

	if (memcmp(id.mn, c->id.mn, sizeof(id.mn)) ||
	    memcmp(id.sn, c->id.mn, sizeof(id.sn)))
		return -ENODEV;

The problem I see is that ctrl info is never filled in (at least in my case).  Both c->id.mn and c->id.sn are blank.  Looking back in the legacy_list function, I don't see how the ctrl info is ever filled in.  Maybe it's just something strange in my case; I would have thought someone would have stumbled across already but maybe not.  If I remove the above check; everything seems to work so I think the code is basically working as expected.    Could you review the changes and either confirm what I'm seeing or let me know if I'm missing something.  

Thanks
  

Jeff Lien
Linux Device Driver Development
Device Host Apps and Drivers
jeff.lien@wdc.com
o: 507-322-2416 (ext. 23-2416)
m: 507-273-9124







_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

* Re: Issue With NVME CLI list Command
  2019-10-10 19:11 Issue With NVME CLI list Command Jeffrey Lien
@ 2019-10-10 19:23 ` Keith Busch
  2019-10-10 19:39   ` Keith Busch
  2019-10-10 19:42   ` Jeffrey Lien
  0 siblings, 2 replies; 5+ messages in thread
From: Keith Busch @ 2019-10-10 19:23 UTC (permalink / raw)
  To: Jeffrey Lien; +Cc: linux-nvme

On Thu, Oct 10, 2019 at 07:11:10PM +0000, Jeffrey Lien wrote:
> Keith, 
> I'm getting a "Failed to scan namespaces" error message back from the
> "nvme list" command after updating my fork and picking up your changes
> from Aug 28th.  The cause of the failure is the following check in the
> function verify_legacy_ns (in nvme-topology.c):
> 
> 	if (memcmp(id.mn, c->id.mn, sizeof(id.mn)) ||
> 	    memcmp(id.sn, c->id.mn, sizeof(id.sn)))
> 		return -ENODEV;
> 
> The problem I see is that ctrl info is never filled in (at least in my
> case).  Both c->id.mn and c->id.sn are blank.  Looking back in the
> legacy_list function, I don't see how the ctrl info is ever filled in.
> Maybe it's just something strange in my case; I would have thought
> someone would have stumbled across already but maybe not.  If I remove
> the above check; everything seems to work so I think the code is
> basically working as expected.    Could you review the changes and
> either confirm what I'm seeing or let me know if I'm missing
> something.  

Hi Jeff,

What kernel version are you using?

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

* Re: Issue With NVME CLI list Command
  2019-10-10 19:23 ` Keith Busch
@ 2019-10-10 19:39   ` Keith Busch
  2019-10-10 20:10     ` Jeffrey Lien
  2019-10-10 19:42   ` Jeffrey Lien
  1 sibling, 1 reply; 5+ messages in thread
From: Keith Busch @ 2019-10-10 19:39 UTC (permalink / raw)
  To: Jeffrey Lien; +Cc: linux-nvme

On Fri, Oct 11, 2019 at 04:23:18AM +0900, Keith Busch wrote:
> On Thu, Oct 10, 2019 at 07:11:10PM +0000, Jeffrey Lien wrote:
> > Keith, 
> > I'm getting a "Failed to scan namespaces" error message back from the
> > "nvme list" command after updating my fork and picking up your changes
> > from Aug 28th.  The cause of the failure is the following check in the
> > function verify_legacy_ns (in nvme-topology.c):
> > 
> > 	if (memcmp(id.mn, c->id.mn, sizeof(id.mn)) ||
> > 	    memcmp(id.sn, c->id.mn, sizeof(id.sn)))
> > 		return -ENODEV;
> > 
> > The problem I see is that ctrl info is never filled in (at least in my
> > case).  Both c->id.mn and c->id.sn are blank.  Looking back in the
> > legacy_list function, I don't see how the ctrl info is ever filled in.
> > Maybe it's just something strange in my case; I would have thought
> > someone would have stumbled across already but maybe not.  If I remove
> > the above check; everything seems to work so I think the code is
> > basically working as expected.    Could you review the changes and
> > either confirm what I'm seeing or let me know if I'm missing
> > something.  
> 
> Hi Jeff,
> 
> What kernel version are you using?

Oops, nevermind, there was a couple bugs in that path. The controller
needed to be initialized before scanning the namespaces, and then we
need to compare the correct fields. Fixed now:

  https://github.com/linux-nvme/nvme-cli/commit/1e858be6c25172f9946e4979ee724244bdd722b2

Thanks for the notice.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

* RE: Issue With NVME CLI list Command
  2019-10-10 19:23 ` Keith Busch
  2019-10-10 19:39   ` Keith Busch
@ 2019-10-10 19:42   ` Jeffrey Lien
  1 sibling, 0 replies; 5+ messages in thread
From: Jeffrey Lien @ 2019-10-10 19:42 UTC (permalink / raw)
  To: Keith Busch; +Cc: linux-nvme

Keith,
Redhat 7.5, version 3.10.0-862.3.3.el7


Jeff Lien

-----Original Message-----
From: Keith Busch <kbusch@kernel.org> 
Sent: Thursday, October 10, 2019 2:23 PM
To: Jeffrey Lien <Jeff.Lien@wdc.com>
Cc: linux-nvme <linux-nvme@lists.infradead.org>
Subject: Re: Issue With NVME CLI list Command

CAUTION: This email originated from outside of Western Digital. Do not click on links or open attachments unless you recognize the sender and know that the content is safe.


On Thu, Oct 10, 2019 at 07:11:10PM +0000, Jeffrey Lien wrote:
> Keith,
> I'm getting a "Failed to scan namespaces" error message back from the 
> "nvme list" command after updating my fork and picking up your changes 
> from Aug 28th.  The cause of the failure is the following check in the 
> function verify_legacy_ns (in nvme-topology.c):
>
>       if (memcmp(id.mn, c->id.mn, sizeof(id.mn)) ||
>           memcmp(id.sn, c->id.mn, sizeof(id.sn)))
>               return -ENODEV;
>
> The problem I see is that ctrl info is never filled in (at least in my 
> case).  Both c->id.mn and c->id.sn are blank.  Looking back in the 
> legacy_list function, I don't see how the ctrl info is ever filled in.
> Maybe it's just something strange in my case; I would have thought 
> someone would have stumbled across already but maybe not.  If I remove 
> the above check; everything seems to work so I think the code is
> basically working as expected.    Could you review the changes and
> either confirm what I'm seeing or let me know if I'm missing 
> something.

Hi Jeff,

What kernel version are you using?

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

* RE: Issue With NVME CLI list Command
  2019-10-10 19:39   ` Keith Busch
@ 2019-10-10 20:10     ` Jeffrey Lien
  0 siblings, 0 replies; 5+ messages in thread
From: Jeffrey Lien @ 2019-10-10 20:10 UTC (permalink / raw)
  To: Keith Busch; +Cc: linux-nvme

Thanks for the quick fix Keith.  


Jeff Lien


-----Original Message-----
From: Keith Busch <kbusch@kernel.org> 
Sent: Thursday, October 10, 2019 2:39 PM
To: Jeffrey Lien <Jeff.Lien@wdc.com>
Cc: linux-nvme <linux-nvme@lists.infradead.org>
Subject: Re: Issue With NVME CLI list Command

CAUTION: This email originated from outside of Western Digital. Do not click on links or open attachments unless you recognize the sender and know that the content is safe.


On Fri, Oct 11, 2019 at 04:23:18AM +0900, Keith Busch wrote:
> On Thu, Oct 10, 2019 at 07:11:10PM +0000, Jeffrey Lien wrote:
> > Keith,
> > I'm getting a "Failed to scan namespaces" error message back from 
> > the "nvme list" command after updating my fork and picking up your 
> > changes from Aug 28th.  The cause of the failure is the following 
> > check in the function verify_legacy_ns (in nvme-topology.c):
> >
> >     if (memcmp(id.mn, c->id.mn, sizeof(id.mn)) ||
> >         memcmp(id.sn, c->id.mn, sizeof(id.sn)))
> >             return -ENODEV;
> >
> > The problem I see is that ctrl info is never filled in (at least in 
> > my case).  Both c->id.mn and c->id.sn are blank.  Looking back in 
> > the legacy_list function, I don't see how the ctrl info is ever filled in.
> > Maybe it's just something strange in my case; I would have thought 
> > someone would have stumbled across already but maybe not.  If I 
> > remove the above check; everything seems to work so I think the code is
> > basically working as expected.    Could you review the changes and
> > either confirm what I'm seeing or let me know if I'm missing 
> > something.
>
> Hi Jeff,
>
> What kernel version are you using?

Oops, nevermind, there was a couple bugs in that path. The controller needed to be initialized before scanning the namespaces, and then we need to compare the correct fields. Fixed now:

  https://github.com/linux-nvme/nvme-cli/commit/1e858be6c25172f9946e4979ee724244bdd722b2

Thanks for the notice.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10 19:11 Issue With NVME CLI list Command Jeffrey Lien
2019-10-10 19:23 ` Keith Busch
2019-10-10 19:39   ` Keith Busch
2019-10-10 20:10     ` Jeffrey Lien
2019-10-10 19:42   ` Jeffrey Lien

Linux-NVME Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nvme/0 linux-nvme/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nvme linux-nvme/ https://lore.kernel.org/linux-nvme \
		linux-nvme@lists.infradead.org
	public-inbox-index linux-nvme

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-nvme


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git