Re: [PATCH v2] nvme: reset disk to the mpath node also when requeuing
From: Christoph Hellwig <hch@lst.de>
Date: 2021-06-03 07:25:42
Also in:
lkml
From: Christoph Hellwig <hch@lst.de>
Date: 2021-06-03 07:25:42
Also in:
lkml
On Wed, Jun 02, 2021 at 03:00:39PM +0200, Daniel Wagner wrote:
+ struct bio *b; blk_qc_t ret = BLK_QC_T_NONE; int srcu_idx;@@ -324,6 +325,8 @@ static blk_qc_t nvme_ns_head_submit_bio(struct bio *bio) dev_warn_ratelimited(dev, "no usable path - requeuing I/O\n"); spin_lock_irq(&head->requeue_lock); + for (b = bio; b; b = b->bi_next) + bio_set_dev(b, head->disk->part0); bio_list_add(&head->requeue_list, bio); spin_unlock_irq(&head->requeue_lock); } else {
I can't see why we'd need this hunk. bio->bi_bdev should have never been changed to start with in this path.
@@ -435,11 +438,6 @@ static void nvme_requeue_work(struct work_struct *work) next = bio->bi_next; bio->bi_next = NULL; - /* - * Reset disk to the mpath node and resubmit to select a new - * path. - */ - bio_set_dev(bio, head->disk->part0); submit_bio_noacct(bio); }
This hunk looks fine. _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme