Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp59006pxj; Thu, 3 Jun 2021 00:27:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxO1cnYpkEBzaZU/egZ27Z+KMsZXVloCRKzjOlk97cpPYhkBuQug9644LKB0HeIKF1eMry+ X-Received: by 2002:a17:907:7201:: with SMTP id dr1mr8942935ejc.19.1622705226091; Thu, 03 Jun 2021 00:27:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622705226; cv=none; d=google.com; s=arc-20160816; b=SrtuM9Mff/egf/Z+/UuWG4tIjafD5J2SmgEiF6KzVmrmAS9SAK87mfvlSp1RdjPVe+ /PpIXHDNpJucEHmxbxYHddNfv6LoWPZ7401l6gikxoH77Gi1eTxLyQzGeIjKXWEJLB3x atPnlOu2yhuSUgLLxjfZ3+Br+ZkqDazTWqpNocZPWGIgTPRoLQADnMBfzI2l0yQ+WfON BScv9UOknM95i4xekh64wFiGPf1FnfeLQ/QoJCRU+lH3NotUGLCSUV26XUxiSm4XZV0G k6+3HR0TBLzZFqE82+PysE6Bk023hAoQPxD8lkhbDbnuCRK5vJdjDUro09Hf1Udq8ZYu xmGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=isRi4hjyvQ/IIKhL95mv9HSzRIGekSV0bp+9QEyknDY=; b=K+YBDD6saYhG7YgZQ6BqkHhLTp0q5Q7+SAk3Odomnb08SVcUuKbALhdLB/GP0GXQme oLagklMTx/cCWGLXXzsAHw6nZlBSQlhTHLMIgsZYAKzmOlntS7pTQvME/XBqhs+es6B2 TKZi0om22ZQsDm6VvM6BFEBzU8TGYf5nCPpsQiLsPZI5v3uKoYE+ZgzBup5WD6GNoduJ g4mpooK5I5UcymjLCShgMsI1sLsng0b1fvNcVoQMTlpHqu5eo6kYrxJBojNGeasl1mBu W0YY3gaCz45voOoOt7bptr1YoxijEyYXbaNRZl+NLNSHmFpOy264cMhPYO9WySP76qrj 4CZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e19si1715549ejb.113.2021.06.03.00.26.36; Thu, 03 Jun 2021 00:27:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229892AbhFCH1Y (ORCPT + 99 others); Thu, 3 Jun 2021 03:27:24 -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.