Re: [PATCH v2 6/7] md/raid1,raid10: skip futile retries on P2PDMA mapping failures

Logan Gunthorpe <[email protected]>
Newsgroups org.infradead.lists.linux-nvme,org.kernel.vger.linux-block,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci,org.kernel.vger.linux-raid,org.kernel.vger.linux-rdma
Message-ID <[email protected]>

On 2026-07-19 04:53, Mykola Marzhan wrote:
>  drivers/md/raid1.c  | 56 +++++++++++++++++++++++++++++++-----
>  drivers/md/raid1.h  |  2 ++
>  drivers/md/raid10.c | 69 ++++++++++++++++++++++++++++++++++++++-------
>  drivers/md/raid10.h |  2 ++

This is an intimidating and massive patch to review. I gotta second the
verbosity of the AI commit messages comment from Keith.

My eyes glazed over a bit. But one point is that maybe this could be
split into multiple patches: one patch introduces R1BIO_P2PDMA, one
patch for raid1 and another patch for raid10? That might make it a bit
more manageable.

Also, I'm not sure if it's possible without digging deeper but, instead
of adding a !p2pdma_unmappable check to every if() statement in the
raid*_end_write_request() functions, might it be possible to factor out
a helper function and return early from it? Maybe the helper could be
shared between raid10 and raid1 as they look very similar. The
differences between the two are minimal -- there might be a bug fix that
was applied to one that should be applied to both?

Thanks!

Logan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.