Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1800458ybt; Thu, 2 Jul 2020 14:19:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyI4cojDwB331MEUOOi8l7XlJaHfcosJfR532pZAcPXecu/N0ZENDcrd0U9RsZsVbzdOae1 X-Received: by 2002:aa7:da8d:: with SMTP id q13mr32988415eds.339.1593724758705; Thu, 02 Jul 2020 14:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593724758; cv=none; d=google.com; s=arc-20160816; b=VBVFURBvz7g8Rm7JFxy1hGZ8PGNC/9EiuvONZvsxzO1bJQrF7i/GVo81h21VQNf7SD f9bHPSaX4+iKYvgCRJoFFU6HlMVUD63Gyp+Zz/8JvOb1MnvxS4GE4kHYTei91EutRoRo oP0huwzDDHt6WylG8ySvtfXdYu27LWdw7xPsZe4E/co9OjB4WAkk2AUFX07yZyLhYNcs R9V58+sSsaZybzOV5hTtWJHsE11l2F/60h3DPSDXzr1cenXd+rEQRsLzATntwS8Tpuf6 qXYSUvLEhywTAdJDt2+nTWjB2NXQq50m9TycpmJDl5LCIbeC3gjByV9a8LMrJ1MEHbZ6 GnOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=uyNh886SCFEVkXK+evDOffcuOU2q5cZWUcy9LVnYtf4=; b=eULFBVsdVXgITDoil+nvFbbnNB2IryNpLSXE/6CIn622+WzmU5Oqu03RXnI2veuhxp Ka4jkI+ZR6rqz3gZ5EkbKfdtg+ZCpluoQMfgcuLCMZaosnnDSyp6v93a3lEUKQ4pjXkl QSNLrERkJ8Wy+etUihhgb6Qk6gDQRmHD111HG6OWdpIRdCh1HuOU4hacpt+Mn32tHqWR NUvuud0/6vq3XYouSO4JsIjjb2qleEUfu/3KnC55yuPnl7k5Aiu0X8aL7QFjSdN8Zn+7 KqUWn03OiqctAe0++9KFKTvCIC45NKbgr/YBp/uw63pCTCc/8TSjYEukjmM4lFtPiQMa BsBA== 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 94si6396447eda.384.2020.07.02.14.18.56; Thu, 02 Jul 2020 14:19:18 -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 S1726343AbgGBVRr (ORCPT + 99 others); Thu, 2 Jul 2020 17:17:47 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:42002 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbgGBVRr (ORCPT ); Thu, 2 Jul 2020 17:17:47 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id D85461C0C0F; Thu, 2 Jul 2020 23:17:44 +0200 (CEST) Date: Thu, 2 Jul 2020 23:17:43 +0200 From: Pavel Machek To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Sagi Grimberg , Anton Eidelman , Christoph Hellwig Subject: Re: [PATCH 4.19 082/131] nvme: fix possible deadlock when I/O is blocked Message-ID: <20200702211743.GE5787@amd> References: <20200629153502.2494656-1-sashal@kernel.org> <20200629153502.2494656-83-sashal@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TD8GDToEDw0WLGOL" Content-Disposition: inline In-Reply-To: <20200629153502.2494656-83-sashal@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --TD8GDToEDw0WLGOL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > From: Sagi Grimberg >=20 > [ Upstream commit 3b4b19721ec652ad2c4fe51dfbe5124212b5f581 ] >=20 > Revert fab7772bfbcf ("nvme-multipath: revalidate nvme_ns_head gendisk > in nvme_validate_ns") >=20 > When adding a new namespace to the head disk (via nvme_mpath_set_live) > we will see partition scan which triggers I/O on the mpath device node. > This process will usually be triggered from the scan_work which holds > the scan_lock. If I/O blocks (if we got ana change currently have only > available paths but none are accessible) this can deadlock on the head > disk bd_mutex as both partition scan I/O takes it, and head disk revalida= tion > takes it to check for resize (also triggered from scan_work on a different > path). See trace [1]. >=20 > The mpath disk revalidation was originally added to detect online disk > size change, but this is no longer needed since commit cb224c3af4df > ("nvme: Convert to use set_capacity_revalidate_and_notify") which already > updates resize info without unnecessarily revalidating the disk (the Unfortunately, v4.19-stable does not contain cb224c3af4df. According to changelog, it seems it should be cherry-picked? Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --TD8GDToEDw0WLGOL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl7+TvcACgkQMOfwapXb+vLCDQCdHgUqVmHHOrxKOFDl+TEPiuA5 qagAoJdaX1u8zSmok2ri4m3VAnjJveuO =UhDj -----END PGP SIGNATURE----- --TD8GDToEDw0WLGOL--