From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DE40C47097 for ; Thu, 3 Jun 2021 07:25:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F012A613E3 for ; Thu, 3 Jun 2021 07:25:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229994AbhFCH1Z (ORCPT ); Thu, 3 Jun 2021 03:27:25 -0400 Received: from verein.lst.de ([213.95.11.211]:60726 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbhFCH1Y (ORCPT ); Thu, 3 Jun 2021 03:27:24 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 9E9B96736F; Thu, 3 Jun 2021 09:25:37 +0200 (CEST) Date: Thu, 3 Jun 2021 09:25:37 +0200 From: Christoph Hellwig To: Daniel Wagner Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg Subject: Re: [PATCH v2] nvme: reset disk to the mpath node also when requeuing Message-ID: <20210603072537.GA4718@lst.de> References: <20210602130039.122879-1-dwagner@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210602130039.122879-1-dwagner@suse.de> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.