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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 57C04C433E0 for ; Thu, 4 Jun 2020 11:56:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 296162075B for ; Thu, 4 Jun 2020 11:56:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JwkPWPVJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 296162075B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=L6Yw2ygb8OskqVWGeBTfvtVJ/3PX8POjHWopa0mw7Ok=; b=JwkPWPVJf94E2EHhLNbvMn+Il+ CLl83+t3DzPqY++LMMe0K6YxGrWv+I2oOKiBBkFsu0o2LFBqLM5Lwpj7Ro+6lze1L3CLcxCKsTESV lV+u5xBkOFtC+cqIenSODeZ9ZBuqcyC/oTYxI8ZRh9+CKb2VJ7nAlw/rpsh3SZjLq/NZhFhRmsdBJ brPfiMd6LGs7xIFA2kIpf4u/+M9l2KuaGfXkKLZPXQHBHVM8S8AkHdk/nicKilT1n8QK9wTi7kJnF kPX54WeuhPFHISj6FN9vSz6p+TYWecdZwHtW7rPQToRaP4HsF6yBPDPermySNS1B8kDBBOq/skDrg +iUsJ4qg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgoU8-0007SS-5r; Thu, 04 Jun 2020 11:56:36 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgoTo-00073m-8r for linux-nvme@lists.infradead.org; Thu, 04 Jun 2020 11:56:18 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D7C49AD25; Thu, 4 Jun 2020 11:56:13 +0000 (UTC) From: Hannes Reinecke To: Christoph Hellwig Subject: [PATCH 2/2] nvme: do not update multipath disk information if the controller is down Date: Thu, 4 Jun 2020 13:56:02 +0200 Message-Id: <20200604115602.78446-3-hare@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200604115602.78446-1-hare@suse.de> References: <20200604115602.78446-1-hare@suse.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200604_045616_460556_E29C6D2E X-CRM114-Status: GOOD ( 14.80 ) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-nvme@lists.infradead.org, Daniel Wagner , Sagi Grimberg , Keith Busch , Hannes Reinecke MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org When nvme_revalidate_disk() is called while the controller is not live we need to avoid revalidating the multipath head device, as any I/O sent to the multipath device might not be possible and we would deadlock trying to flush the scan thread during reconnect. Reported-by: Martin George Signed-off-by: Hannes Reinecke --- drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index b811787505f7..4b5bca5f2e4f 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1971,7 +1971,7 @@ static int __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id) blk_queue_chunk_sectors(ns->queue, rounddown_pow_of_two(iob)); nvme_update_disk_info(disk, ns, id); #ifdef CONFIG_NVME_MULTIPATH - if (ns->head->disk) { + if (ns->head->disk && ctrl->state == NVME_CTRL_LIVE) { nvme_update_disk_info(ns->head->disk, ns, id); blk_queue_stack_limits(ns->head->disk->queue, ns->queue); revalidate_disk(ns->head->disk); -- 2.16.4 _______________________________________________ linux-nvme mailing list linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme