* [PATCH] nvmet: don't try to add ns to p2p map unless it actually uses it
@ 2018-11-02 23:12 Sagi Grimberg
2018-11-05 17:48 ` Logan Gunthorpe
2018-11-07 8:28 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Sagi Grimberg @ 2018-11-02 23:12 UTC (permalink / raw)
Even without CONFIG_P2PDMA this results in a error print:
nvmet: no peer-to-peer memory is available that's supported by rxe0 and /dev/nullb0
Fixes: c6925093d0b2 ("nvmet: Optionally use PCI P2P memory")
Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
---
drivers/nvme/target/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 0454fec46261..ae05afa19b4b 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -422,7 +422,7 @@ static void nvmet_p2pmem_ns_add_p2p(struct nvmet_ctrl *ctrl,
struct pci_dev *p2p_dev;
int ret;
- if (!ctrl->p2p_client)
+ if (!ctrl->p2p_client || !ns->use_p2pmem)
return;
if (ns->p2p_dev) {
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH] nvmet: don't try to add ns to p2p map unless it actually uses it 2018-11-02 23:12 [PATCH] nvmet: don't try to add ns to p2p map unless it actually uses it Sagi Grimberg @ 2018-11-05 17:48 ` Logan Gunthorpe 2018-11-07 8:28 ` Christoph Hellwig 1 sibling, 0 replies; 3+ messages in thread From: Logan Gunthorpe @ 2018-11-05 17:48 UTC (permalink / raw) On 02/11/18 05:12 PM, Sagi Grimberg wrote: > Even without CONFIG_P2PDMA this results in a error print: > nvmet: no peer-to-peer memory is available that's supported by rxe0 and /dev/nullb0 > > Fixes: c6925093d0b2 ("nvmet: Optionally use PCI P2P memory") > Signed-off-by: Sagi Grimberg <sagi at grimberg.me> Nice Catch. Thanks. Reviewed-by: Logan Gunthorpe <logang at deltatee.com> > --- > drivers/nvme/target/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c > index 0454fec46261..ae05afa19b4b 100644 > --- a/drivers/nvme/target/core.c > +++ b/drivers/nvme/target/core.c > @@ -422,7 +422,7 @@ static void nvmet_p2pmem_ns_add_p2p(struct nvmet_ctrl *ctrl, > struct pci_dev *p2p_dev; > int ret; > > - if (!ctrl->p2p_client) > + if (!ctrl->p2p_client || !ns->use_p2pmem) > return; > > if (ns->p2p_dev) { > ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] nvmet: don't try to add ns to p2p map unless it actually uses it 2018-11-02 23:12 [PATCH] nvmet: don't try to add ns to p2p map unless it actually uses it Sagi Grimberg 2018-11-05 17:48 ` Logan Gunthorpe @ 2018-11-07 8:28 ` Christoph Hellwig 1 sibling, 0 replies; 3+ messages in thread From: Christoph Hellwig @ 2018-11-07 8:28 UTC (permalink / raw) Thanks, applied to nvme-4.20. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-07 8:28 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-11-02 23:12 [PATCH] nvmet: don't try to add ns to p2p map unless it actually uses it Sagi Grimberg 2018-11-05 17:48 ` Logan Gunthorpe 2018-11-07 8:28 ` Christoph Hellwig
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).