On 2018-10-04 4:20 p.m., Sagi Grimberg wrote:
>> +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.
> And this?
> --
> diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c
> 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.
Logan
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
- [PATCH v9 00/13] Copy Offload in NVMe Fabrics with P2P P... Logan Gunthorpe
- [PATCH v9 08/13] IB/core: Ensure we map P2P memory ... Logan Gunthorpe
- Re: [PATCH v9 08/13] IB/core: Ensure we map P2P... Christoph Hellwig
- [PATCH v9 11/13] nvme-pci: Add a quirk for a pseudo... Logan Gunthorpe
- Re: [PATCH v9 11/13] nvme-pci: Add a quirk for ... Christoph Hellwig
- Re: [PATCH v9 11/13] nvme-pci: Add a quirk ... Logan Gunthorpe
- [PATCH v9 13/13] nvmet: Optionally use PCI P2P memo... Logan Gunthorpe
- Re: [PATCH v9 13/13] nvmet: Optionally use PCI ... Sagi Grimberg
- Re: [PATCH v9 13/13] nvmet: Optionally use ... Logan Gunthorpe
- Re: [PATCH v9 13/13] nvmet: Optionally ... Christoph Hellwig
- Re: [PATCH v9 13/13] nvmet: Option... Sagi Grimberg
- Re: [PATCH v9 13/13] nvmet: Option... Logan Gunthorpe
- [PATCH v9 03/13] PCI/P2PDMA: Add PCI p2pmem DMA map... Logan Gunthorpe
- Re: [PATCH v9 03/13] PCI/P2PDMA: Add PCI p2pmem... Christoph Hellwig
- [PATCH v9 12/13] nvmet: Introduce helper functions ... Logan Gunthorpe
- Re: [PATCH v9 12/13] nvmet: Introduce helper fu... Christoph Hellwig
- [PATCH v9 01/13] PCI/P2PDMA: Support peer-to-peer m... Logan Gunthorpe
- [PATCH v9 07/13] block: Add PCI P2P flag for reques... Logan Gunthorpe
- Re: [PATCH v9 07/13] block: Add PCI P2P flag fo... Christoph Hellwig
