Thread (35 messages) 35 messages, 5 authors, 2018-10-11

Re: [PATCH v9 13/13] nvmet: Optionally use PCI P2P memory

From: Christoph Hellwig <hch@lst.de>
Date: 2018-10-05 07:07:27
Also in: linux-nvme, linux-pci, linux-rdma, lkml, nvdimm

On Thu, Oct 04, 2018 at 04:29:19PM -0600, Logan Gunthorpe wrote:

On 2018-10-04 4:20 p.m., Sagi Grimberg wrote:
quoted
quoted
+static inline struct device *nvmet_ns_dev(struct nvmet_ns *ns)
+{
+	return disk_to_dev(ns->bdev->bd_disk);
+}
This needs to handle non bdev namespaces.
As it's coded now the helper never gets called unless ns->bdev is not
null. But in general, yes you are right, we should probably return NULL
if ns->bdev is NULL.
I'd rather skip that for now.
quoted
index ef286b72d958..3d12f5f4568d 100644
--- a/drivers/nvme/target/fc.c
+++ b/drivers/nvme/target/fc.c
@@ -2280,6 +2280,7 @@ nvmet_fc_handle_fcp_rqst(struct nvmet_fc_tgtport 
*tgtport,
         fod->req.cmd = &fod->cmdiubuf.sqe;
         fod->req.rsp = &fod->rspiubuf.cqe;
         fod->req.port = tgtport->pe->port;
+       fod->req.p2p_client = tgtport->dev;

         /* clear any response payload */
         memset(&fod->rspiubuf, 0, sizeof(fod->rspiubuf));
--
Sure, I guess that makes sense. I've never tried it with fc hardware but
I assume there's no reason it wouldn't work.

I'll queue these changes up for a v10.
And I'd wait until someone has actually tested this case.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help