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

Leon Romanovsky <[email protected]> Thu, 23 Jul 2026 09:11:18 +0300
Newsgroups org.kernel.vger.linux-raid,org.infradead.lists.linux-nvme,org.kernel.vger.linux-block,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci,org.kernel.vger.linux-rdma
Message-ID <20260723061118.GA110966@unreal>
On Wed, Jul 22, 2026 at 09:00:16PM +0200, Mykola Marzhan wrote:
> > 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?
> 
> Yes, and it already does: the block layer ANDs the P2PDMA queue
> feature across all legs, so an array with a non-P2P member
> (e.g. an nvme-tcp leg) never advertises P2P at all.
> 
> But that flag can only say "this driver can do P2P in general".
> md cannot see which HCA device does the DMA for a fabrics leg —
> and with multipath failover it can change at any time.
> 
> So the up-front gate covers what is knowable up front.
> This series is about the remainder.
> In mixed case, one local P2P leg plus a remote replica, with it:
> 1) a failed read just redirects to a capable mirror;
> 2) a failed write records bad blocks instead of retrying forever.

Thanks for the explanation.

> 
> Mykola
>