From: Keith Busch <kbusch@kernel.org>
To: Logan Gunthorpe <logang@deltatee.com>
Cc: Keith Busch <keith.busch@intel.com>,
Hannes Reinecke <hare@suse.com>, Sagi Grimberg <sagi@grimberg.me>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org,
Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] nvme-core: Fix subsystem instance mismatches
Date: Wed, 4 Sep 2019 11:14:45 -0600 [thread overview]
Message-ID: <20190904171445.GG21302@localhost.localdomain> (raw)
In-Reply-To: <f07e03f1-48f0-591e-fdf6-9499fa4dd9ab@deltatee.com>
On Wed, Sep 04, 2019 at 11:01:22AM -0600, Logan Gunthorpe wrote:
> Oh, yes that's simpler than the struct/kref method and looks like it
> will accomplish the same thing. I did some brief testing with it and it
> seems to work for me (though I don't have any subsystems with multiple
> controllers). If you want to make a patch out of it you can add my
>
> Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Thanks! I'll make it a proper patch and send shortly.
For testing multi-controller subsystems, I haven't got proper hardware
either, so I really like the nvme loop target. Here's a very simple json
defining a two namespace subsystem backed by two real nvme devices:
loop.json:
---
{
"ports": [
{
"addr": {
"adrfam": "",
"traddr": "",
"treq": "not specified",
"trsvcid": "",
"trtype": "loop"
},
"portid": 1,
"referrals": [],
"subsystems": [
"testnqn"
]
}
],
"subsystems": [
{
"attr": {
"allow_any_host": "1"
},
"namespaces": [
{
"device": {
"nguid": "ef90689c-6c46-d44c-89c1-4067801309a8",
"path": "/dev/nvme0n1"
},
"enable": 1,
"nsid": 1
},
{
"device": {
"nguid": "ef90689c-6c46-d44c-89c1-4067801309a9",
"path": "/dev/nvme1n1"
},
"enable": 1,
"nsid": 2
}
],
"nqn": "testnqn"
}
]
}
--
Configure the target:
# nvmetcli restore loop.json
Connect to it twice:
# nvme connect -n testnqn -t loop
# nvme connect -n testnqn -t loop
List the result:
# nvme list -v
NVM Express Subsystems
Subsystem Subsystem-NQN Controllers
---------------- ------------------------------------------------------------------------------------------------ ----------------
nvme-subsys0 nqn.2014.08.org.nvmexpress:8086108ePHLE7200015N6P4BGN-17335943:ICDPC5ED2ORA6.4T nvme0
nvme-subsys1 nqn.2014.08.org.nvmexpress:8086108ePHLE7200015N6P4BGN-27335943:ICDPC5ED2ORA6.4T nvme1
nvme-subsys2 testnqn nvme2, nvme3
NVM Express Controllers
Device SN MN FR TxPort Address Subsystem Namespaces
-------- -------------------- ---------------------------------------- -------- ------ -------------- ------------ ----------------
nvme0 PHLE7200015N6P4BGN-1 7335943:ICDPC5ED2ORA6.4T QDV1RD07 pcie 0000:88:00.0 nvme-subsys0 nvme0n1
nvme1 PHLE7200015N6P4BGN-2 7335943:ICDPC5ED2ORA6.4T QDV1RD03 pcie 0000:89:00.0 nvme-subsys1 nvme1n1
nvme2 9eb72cbeecc6fdb0 Linux 5.3.0-rc loop nvme-subsys2 nvme2n1, nvme2n2
nvme3 9eb72cbeecc6fdb0 Linux 5.3.0-rc loop nvme-subsys2 nvme2n1, nvme2n2
NVM Express Namespaces
Device NSID Usage Format Controllers
------------ -------- -------------------------- ---------------- ----------------
nvme0n1 1 3.20 TB / 3.20 TB 512 B + 0 B nvme0
nvme1n1 1 3.20 TB / 3.20 TB 512 B + 0 B nvme1
nvme2n1 1 3.20 TB / 3.20 TB 512 B + 0 B nvme2, nvme3
nvme2n2 2 3.20 TB / 3.20 TB 512 B + 0 B nvme2, nvme3
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
WARNING: multiple messages have this Message-ID (diff)
From: Keith Busch <kbusch@kernel.org>
To: Logan Gunthorpe <logang@deltatee.com>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@fb.com>,
Hannes Reinecke <hare@suse.com>, Sagi Grimberg <sagi@grimberg.me>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org,
Keith Busch <keith.busch@intel.com>
Subject: Re: [PATCH] nvme-core: Fix subsystem instance mismatches
Date: Wed, 4 Sep 2019 11:14:45 -0600 [thread overview]
Message-ID: <20190904171445.GG21302@localhost.localdomain> (raw)
In-Reply-To: <f07e03f1-48f0-591e-fdf6-9499fa4dd9ab@deltatee.com>
On Wed, Sep 04, 2019 at 11:01:22AM -0600, Logan Gunthorpe wrote:
> Oh, yes that's simpler than the struct/kref method and looks like it
> will accomplish the same thing. I did some brief testing with it and it
> seems to work for me (though I don't have any subsystems with multiple
> controllers). If you want to make a patch out of it you can add my
>
> Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Thanks! I'll make it a proper patch and send shortly.
For testing multi-controller subsystems, I haven't got proper hardware
either, so I really like the nvme loop target. Here's a very simple json
defining a two namespace subsystem backed by two real nvme devices:
loop.json:
---
{
"ports": [
{
"addr": {
"adrfam": "",
"traddr": "",
"treq": "not specified",
"trsvcid": "",
"trtype": "loop"
},
"portid": 1,
"referrals": [],
"subsystems": [
"testnqn"
]
}
],
"subsystems": [
{
"attr": {
"allow_any_host": "1"
},
"namespaces": [
{
"device": {
"nguid": "ef90689c-6c46-d44c-89c1-4067801309a8",
"path": "/dev/nvme0n1"
},
"enable": 1,
"nsid": 1
},
{
"device": {
"nguid": "ef90689c-6c46-d44c-89c1-4067801309a9",
"path": "/dev/nvme1n1"
},
"enable": 1,
"nsid": 2
}
],
"nqn": "testnqn"
}
]
}
--
Configure the target:
# nvmetcli restore loop.json
Connect to it twice:
# nvme connect -n testnqn -t loop
# nvme connect -n testnqn -t loop
List the result:
# nvme list -v
NVM Express Subsystems
Subsystem Subsystem-NQN Controllers
---------------- ------------------------------------------------------------------------------------------------ ----------------
nvme-subsys0 nqn.2014.08.org.nvmexpress:8086108ePHLE7200015N6P4BGN-17335943:ICDPC5ED2ORA6.4T nvme0
nvme-subsys1 nqn.2014.08.org.nvmexpress:8086108ePHLE7200015N6P4BGN-27335943:ICDPC5ED2ORA6.4T nvme1
nvme-subsys2 testnqn nvme2, nvme3
NVM Express Controllers
Device SN MN FR TxPort Address Subsystem Namespaces
-------- -------------------- ---------------------------------------- -------- ------ -------------- ------------ ----------------
nvme0 PHLE7200015N6P4BGN-1 7335943:ICDPC5ED2ORA6.4T QDV1RD07 pcie 0000:88:00.0 nvme-subsys0 nvme0n1
nvme1 PHLE7200015N6P4BGN-2 7335943:ICDPC5ED2ORA6.4T QDV1RD03 pcie 0000:89:00.0 nvme-subsys1 nvme1n1
nvme2 9eb72cbeecc6fdb0 Linux 5.3.0-rc loop nvme-subsys2 nvme2n1, nvme2n2
nvme3 9eb72cbeecc6fdb0 Linux 5.3.0-rc loop nvme-subsys2 nvme2n1, nvme2n2
NVM Express Namespaces
Device NSID Usage Format Controllers
------------ -------- -------------------------- ---------------- ----------------
nvme0n1 1 3.20 TB / 3.20 TB 512 B + 0 B nvme0
nvme1n1 1 3.20 TB / 3.20 TB 512 B + 0 B nvme1
nvme2n1 1 3.20 TB / 3.20 TB 512 B + 0 B nvme2, nvme3
nvme2n2 2 3.20 TB / 3.20 TB 512 B + 0 B nvme2, nvme3
next prev parent reply other threads:[~2019-09-04 17:16 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-31 0:01 [PATCH] nvme-core: Fix subsystem instance mismatches Logan Gunthorpe
2019-08-31 0:01 ` Logan Gunthorpe
2019-08-31 15:29 ` Keith Busch
2019-08-31 15:29 ` Keith Busch
2019-09-03 16:08 ` Logan Gunthorpe
2019-09-03 16:08 ` Logan Gunthorpe
2019-09-03 16:46 ` Keith Busch
2019-09-03 16:46 ` Keith Busch
2019-09-03 18:13 ` Logan Gunthorpe
2019-09-03 18:13 ` Logan Gunthorpe
2019-09-04 6:05 ` Christoph Hellwig
2019-09-04 6:05 ` Christoph Hellwig
2019-09-04 14:44 ` Keith Busch
2019-09-04 14:44 ` Keith Busch
2019-09-04 15:42 ` Christoph Hellwig
2019-09-04 15:42 ` Christoph Hellwig
2019-09-04 15:54 ` Keith Busch
2019-09-04 15:54 ` Keith Busch
2019-09-04 16:02 ` Christoph Hellwig
2019-09-04 16:02 ` Christoph Hellwig
2019-09-04 16:07 ` Logan Gunthorpe
2019-09-04 16:07 ` Logan Gunthorpe
2019-09-04 16:35 ` Keith Busch
2019-09-04 16:35 ` Keith Busch
2019-09-04 17:01 ` Logan Gunthorpe
2019-09-04 17:01 ` Logan Gunthorpe
2019-09-04 17:14 ` Keith Busch [this message]
2019-09-04 17:14 ` Keith Busch
2019-09-04 17:29 ` Logan Gunthorpe
2019-09-04 17:29 ` Logan Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190904171445.GG21302@localhost.localdomain \
--to=kbusch@kernel.org \
--cc=axboe@fb.com \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=logang@deltatee.com \
--cc=martin.petersen@oracle.com \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.