All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Logan Gunthorpe <logang@deltatee.com>
Cc: 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,
	Li Nan <magiclinan@didiglobal.com>, Xiao Ni <xiao@kernel.org>,
	Guoqing Jiang <guoqing.jiang@linux.dev>,
	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 v2 6/7] md/raid1,raid10: skip futile retries on P2PDMA mapping failures
Date: Wed, 22 Jul 2026 11:30:15 +0300	[thread overview]
Message-ID: <20260722083015.GU110966@unreal> (raw)
In-Reply-To: <9f846c85-f427-433a-b87d-8e9e3a4406e7@deltatee.com>

On Tue, Jul 21, 2026 at 05:38:53PM -0600, Logan Gunthorpe wrote:
> 
> 
> On 2026-07-21 11:50, Mykola Marzhan wrote:
> > I have split it in v3 into a raid1 patch and a raid10 patch.
> > I am not sure about separate "introduce the bit" patches.
> > R1BIO_P2PDMA and R10BIO_P2PDMA are entries in the two personalities'
> > with own r*bio state enums.
> > The commit messages are shorter now.
> 
> That helps a bit, thanks.
> 
> 
> > An early return doesn't work here: on a mapping failure the
> > function must still fall through to set R1BIO_WriteError, so the
> > completion path runs the (single, whole-range) retry and records
> > the bad range -- only WantReplacement and the FailFast md_error()
> > are skipped.  v3 folds the two tests into one branch now,
> > which reads better and keeps the fall-through. Please check v3.
> 
> The early return works if you create a helper.
> 
> > I compared the two sides after splitting: the P2PDMA handling is
> > symmetric, and the remaining differences are pre-existing
> > personality differences rather than missed fixes.
> > A shared helper would be heavier than the two open-coded branches,
> > so I kept it per-personality.
> 
> Yeah, I still think it's a bit of a mess so I dug into it a bit more
> myself.
> 
> I realized the real problem in this patch set was reusing
> BLK_STS_TARGET. I think I may have used that a long time ago and those
> paths have since been removed. Using it here doesn't quite make sense
> because we end up with those awkward checks (is P2PDMA enabled *and* the
> error is a BLK_STS_TARGET). I don't think that can ever really be
> correct here seeing something could, in theory return BLK_STS_TARGET for
> another reason even when P2PDMA is enabled. So that should be cleaned up.

I had thoughts about this series too. It seems best to avoid
the P2P path entirely unless all legs support P2P.

Can the md/raid code determine P2P support in advance?

Thanks


  reply	other threads:[~2026-07-22  8:30 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-19 10:53 [PATCH v2 0/7] block,md,nvme: correct handling of unsupported P2PDMA transfers Mykola Marzhan
2026-07-19 10:53 ` [PATCH v2 1/7] blk-mq-dma: restore BLK_STS_TARGET for unsupported P2P transfers Mykola Marzhan
2026-07-19 11:01   ` sashiko-bot
2026-07-20 14:49   ` Christoph Hellwig
     [not found]     ` <CAPzsNDv6hUV3gHdaxuwjRcr4couUKq_M5DKObFNaYqCHnm7ZMw@mail.gmail.com>
2026-07-20 18:42       ` Logan Gunthorpe
2026-07-20 18:49         ` Logan Gunthorpe
2026-07-21 17:49           ` Mykola Marzhan
2026-07-19 10:53 ` [PATCH v2 2/7] md: ensure REQ_NOMERGE is set on P2PDMA bios Mykola Marzhan
2026-07-19 11:02   ` sashiko-bot
2026-07-19 10:53 ` [PATCH v2 3/7] md/raid1: serialize non-write-behind writes on CollisionCheck rdevs Mykola Marzhan
2026-07-19 11:08   ` sashiko-bot
2026-07-19 10:53 ` [PATCH v2 4/7] md/raid1: don't use write-behind for P2PDMA bios Mykola Marzhan
2026-07-19 11:05   ` sashiko-bot
2026-07-20 16:31   ` Logan Gunthorpe
2026-07-19 10:53 ` [PATCH v2 5/7] md/raid1,raid10: keep REQ_NOMERGE on narrow_write_error() retry clones Mykola Marzhan
2026-07-19 11:20   ` sashiko-bot
2026-07-20 16:32   ` Logan Gunthorpe
2026-07-19 10:53 ` [PATCH v2 6/7] md/raid1,raid10: skip futile retries on P2PDMA mapping failures Mykola Marzhan
2026-07-19 11:11   ` sashiko-bot
2026-07-20 16:49   ` Logan Gunthorpe
2026-07-21 17:50     ` Mykola Marzhan
2026-07-21 23:38       ` Logan Gunthorpe
2026-07-22  8:30         ` Leon Romanovsky [this message]
2026-07-22 19:00           ` Mykola Marzhan
2026-07-23  6:11             ` Leon Romanovsky
2026-07-22 18:59         ` Mykola Marzhan
2026-07-19 10:53 ` [PATCH v2 7/7] nvme-rdma: return BLK_STS_TARGET for unsupported P2P transfers Mykola Marzhan
2026-07-19 11:17   ` sashiko-bot

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=20260722083015.GU110966@unreal \
    --to=leon@kernel.org \
    --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=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=logang@deltatee.com \
    --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 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.