From: Logan Gunthorpe <logang@deltatee.com>
To: Mykola Marzhan <mykola@meshstor.io>, Jens Axboe <axboe@kernel.dk>,
Song Liu <song@kernel.org>, Yu Kuai <yukuai@fygo.io>,
Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
Sagi Grimberg <sagi@grimberg.me>,
linux-block@vger.kernel.org, linux-raid@vger.kernel.org,
linux-nvme@lists.infradead.org
Cc: Li Nan <magiclinan@didiglobal.com>, Xiao Ni <xiao@kernel.org>,
Guoqing Jiang <guoqing.jiang@linux.dev>,
Leon Romanovsky <leon@kernel.org>, Jason Gunthorpe <jgg@ziepe.ca>,
Kiran Kumar Modukuri <kmodukuri@nvidia.com>,
Chaitanya Kulkarni <kch@nvidia.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Shivaji Kant <shivajikant@google.com>,
Pranjal Shrivastava <praan@google.com>,
Henrique Carvalho <henrique.carvalho@suse.com>,
linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-pci@vger.kernel.org
Subject: Re: [PATCH v4 9/9] nvme-rdma: return BLK_STS_P2PDMA for unsupported P2P transfers
Date: Wed, 22 Jul 2026 15:59:55 -0600 [thread overview]
Message-ID: <528ead56-5621-48ec-8828-d9071ebfa2bb@deltatee.com> (raw)
In-Reply-To: <20260722185841.449934-10-mykola@meshstor.io>
On 2026-07-22 12:58, Mykola Marzhan wrote:
> diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
> index 6909e3542794..2f50509a7a61 100644
> --- a/drivers/nvme/host/rdma.c
> +++ b/drivers/nvme/host/rdma.c
> @@ -1469,6 +1469,7 @@ static int nvme_rdma_dma_map_req(struct ib_device *ibdev, struct request *rq,
> int *count, int *pi_count)
> {
> struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq);
> + struct sg_table sgt;
> int ret;
>
> req->data_sgl.sg_table.sgl = (struct scatterlist *)(req + 1);
> @@ -1480,12 +1481,14 @@ static int nvme_rdma_dma_map_req(struct ib_device *ibdev, struct request *rq,
>
> req->data_sgl.nents = blk_rq_map_sg(rq, req->data_sgl.sg_table.sgl);
>
> - *count = ib_dma_map_sg(ibdev, req->data_sgl.sg_table.sgl,
> - req->data_sgl.nents, rq_dma_dir(rq));
> - if (unlikely(*count <= 0)) {
> - ret = -EIO;
> + sgt = (struct sg_table) {
> + .sgl = req->data_sgl.sg_table.sgl,
> + .orig_nents = req->data_sgl.nents,
> + };
Maybe we could make this patch a little clearer by splitting the change
to sg_table into it's own patch? That would make it much easier for me
to review. I've looked through it now a couple times and think it's ok,
but it's a little more complex than I can really untangle in my head.
Per your other email, I think that will make things good from my
perspective for v5, but I reserve the right to find something new when I
look at it ;)
Thanks for your efforts cleaning this up.
Logan
prev parent reply other threads:[~2026-07-22 22:00 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 18:58 [PATCH v4 0/9] block,md,nvme: correct handling of unsupported P2PDMA transfers Mykola Marzhan
2026-07-22 18:58 ` [PATCH v4 1/9] block: add BLK_STS_P2PDMA for unsupported peer-to-peer transfers Mykola Marzhan
2026-07-22 19:06 ` sashiko-bot
2026-07-22 18:58 ` [PATCH v4 2/9] md: ensure REQ_NOMERGE is set on P2PDMA bios Mykola Marzhan
2026-07-22 19:07 ` sashiko-bot
2026-07-22 18:58 ` [PATCH v4 3/9] md/raid1: serialize non-write-behind writes on CollisionCheck rdevs Mykola Marzhan
2026-07-22 19:14 ` sashiko-bot
2026-07-22 18:58 ` [PATCH v4 4/9] md/raid1: don't use write-behind for P2PDMA bios Mykola Marzhan
2026-07-22 19:11 ` sashiko-bot
2026-07-22 18:58 ` [PATCH v4 5/9] md/raid1,raid10: factor out raid1_write_error() helper Mykola Marzhan
2026-07-22 19:05 ` sashiko-bot
2026-07-22 18:58 ` [PATCH v4 6/9] md/raid1,raid10: keep REQ_NOMERGE on narrow_write_error() retry clones Mykola Marzhan
2026-07-22 19:16 ` sashiko-bot
2026-07-22 18:58 ` [PATCH v4 7/9] md/raid1,raid10: skip futile retries on P2PDMA mapping failures Mykola Marzhan
2026-07-22 19:10 ` sashiko-bot
2026-07-22 19:18 ` Logan Gunthorpe
2026-07-22 19:50 ` Mykola Marzhan
2026-07-22 18:58 ` [PATCH v4 8/9] md/raid1,raid10: set IO_BLOCKED in case of BLK_STS_P2PDMA Mykola Marzhan
2026-07-22 19:16 ` sashiko-bot
2026-07-22 19:19 ` Logan Gunthorpe
2026-07-22 20:02 ` Mykola Marzhan
2026-07-23 3:11 ` Logan Gunthorpe
2026-07-22 18:58 ` [PATCH v4 9/9] nvme-rdma: return BLK_STS_P2PDMA for unsupported P2P transfers Mykola Marzhan
2026-07-22 19:20 ` sashiko-bot
2026-07-22 21:59 ` Logan Gunthorpe [this message]
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=528ead56-5621-48ec-8828-d9071ebfa2bb@deltatee.com \
--to=logang@deltatee.com \
--cc=axboe@kernel.dk \
--cc=bhelgaas@google.com \
--cc=guoqing.jiang@linux.dev \
--cc=hch@lst.de \
--cc=henrique.carvalho@suse.com \
--cc=jgg@ziepe.ca \
--cc=kbusch@kernel.org \
--cc=kch@nvidia.com \
--cc=kmodukuri@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=magiclinan@didiglobal.com \
--cc=mykola@meshstor.io \
--cc=praan@google.com \
--cc=sagi@grimberg.me \
--cc=shivajikant@google.com \
--cc=song@kernel.org \
--cc=xiao@kernel.org \
--cc=yukuai@fygo.io \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox