lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210603072537.GA4718@lst.de>
Date:   Thu, 3 Jun 2021 09:25:37 +0200
From:   Christoph Hellwig <hch@....de>
To:     Daniel Wagner <dwagner@...e.de>
Cc:     linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...com>,
        Christoph Hellwig <hch@....de>,
        Sagi Grimberg <sagi@...mberg.me>
Subject: Re: [PATCH v2] nvme: reset disk to the mpath node also when
 requeuing

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ