Re: [PATCH] nvme-multipath: set BIO_REMAPPED on bios remapped to per-path namespace disks

From: hch@xxxxxx

Date: Tue May 19 2026 - 03:00:17 EST


On Mon, May 18, 2026 at 01:23:17PM -0600, Keith Busch wrote:
> On Mon, May 18, 2026 at 02:52:56PM +0000, Achkinazi, Igor wrote:
> > @@ -511,6 +511,13 @@ static void nvme_ns_head_submit_bio(struct bio *bio)
> > ns = nvme_find_path(head);
> > if (likely(ns)) {
> > bio_set_dev(bio, ns->disk->part0);
> > + /*
> > + * Mark the bio as remapped to the per-path namespace disk so
> > + * that bio_check_eod() is skipped on resubmission (e.g. from
> > + * bio splitting in blk_mq_submit_bio). The EOD check already
> > + * passed on the multipath head disk.
> > + */
> > + bio_set_flag(bio, BIO_REMAPPED);
>
> Any reason nvme multipath can't call submit_bio_noacct_nocheck()
> directly instead? If it's safe to skip the eod check here, then it
> looks safe to skip everything else too.

We really shouldn't expose that, and it doesn't quite to the
right checks here.

But I think the proper fix is to stop using bio_set_dev entirely.
We do not want to associate the bio with a new blkg as those are
basically not going to exist for the underlying devices. I'm also
not sure we want to allow another round of BPF throttling either.