Re: [PATCH 12/15] block: switch polling to be bio based

Christoph Hellwig
2021-05-14T16:28:38Z

On Fri, May 14, 2021 at 09:26:12AM -0700, Keith Busch wrote:
> diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
> index 7febdb57f690..d40a9331daf7 100644
> --- a/drivers/nvme/host/multipath.c
> +++ b/drivers/nvme/host/multipath.c
> @@ -419,6 +419,11 @@ static void nvme_requeue_work(struct work_struct *work)
> * path.
> */
> bio_set_dev(bio, head->disk->part0);
> +
> + if (bio->bi_opf & REQ_POLLED) {
> + bio->bi_opf &= ~REQ_POLLED;
> + bio->bi_cookie = BLK_QC_T_NONE;
> + }
> submit_bio_noacct(bio);
> }
> }
> --
>
> This should fix the hang since requeued bio's will use an interrupt
> driven queue, but it doesn't fix the warning. The recent commit
> "nvme-multipath: reset bdev to ns head when failover" looks like it
> makes preventing the polling thread from using the non-MQ head disk
> not possible.

Yes. Althought I'd rather move the code together with the bio stealing
in nvme_failover_req (and possibly move it into a block layer helper
as it is too subtle to be open coded in drivers).