Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp190491ybt; Tue, 7 Jul 2020 20:08:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtiJ/kqs0dyV6kgsIcBlXWTSJ3iZ8OrGZuLpldmf1t4CULY7OxvFaxrhyTaolJ0pu7v5+a X-Received: by 2002:aa7:d1c8:: with SMTP id g8mr65310899edp.337.1594177723010; Tue, 07 Jul 2020 20:08:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594177723; cv=none; d=google.com; s=arc-20160816; b=Q0+T+f0JnGOXZd3UB4JOyePOuJxAeIhRRaLytc1mJEZNfaWSSZAvm2uuCizBhEZAQP LRxvfxHkhw8FHt03W3QBmi52nwiPq+ejqvOm+C+EzlKbScXEbkrnuANal5WPSYms6qBd 3fgbU2vEL+Z4g0M233tZC/CI2rrRAC7R42Av+5j+/sothA+3VMlWgR36bXSAkeuWaOi5 A4TK0Tb5Qu5omKTw1cDKuP7vPKWO5jVzremA8zYAaaGz5JXai/Ehyqwbo8mnTv5+Lgzr X1cIQoNw2jbkp0vMYuVwc/CaUJiAVBYTGprRw0PsJL6vaxGVoZbOL7D9Q7atI/ss7jt1 YZ6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Po47XZCW9WSlhxL3zrVyBXr2tQQtOKfMmVUWnBxfo68=; b=xaLeBkZH4ureX1TlbiqlVxx+zz58eC1ENweVdMpf7/PDT0kzu/sVGsgFvbFmbDoTA0 DZ2FSVo+H4Ec+U7Tbl07eDENC5yq4y+oSY4jNDe1+gbNuOhFv1SXlgocUrJ8jhRMiRiL w3falZ5K5nUUy2Z2DB2UU1s+qpkP/nJQulcV5e2Ift9nywPMnxZqyEbv+rdX0Q9zQAaY w709Hcjcn+bL89KfOtFiami/fuCML2PDYJadpEOGPhFu9V3td2IRQWwrRhvdNnqzt5AZ AwPqQqNyKl73V700n1x041Kogq+ztlBJYZ2CH6eg9aM8xjgqJalAmXqXrpmkLph1VttW fZsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ik3+CPSP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt2si14712610ejb.597.2020.07.07.20.07.53; Tue, 07 Jul 2020 20:08:43 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Ik3+CPSP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729199AbgGHC3i (ORCPT + 99 others); Tue, 7 Jul 2020 22:29:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:40594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729014AbgGHC3i (ORCPT ); Tue, 7 Jul 2020 22:29:38 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1A3CF20774; Wed, 8 Jul 2020 02:29:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594175377; bh=xgGx6uwzn9NeaS+l/FPAXpAhoUdDQ2XZYX9DVgRf5YU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ik3+CPSPmGpG2ABntxHOaGn++8Mk0ZxRqeqGC8DMhDNuvYFl6h2xPef1WYY0+Fi8R +ONgL8jclZXHfUWwVBxaAdyk9VXXxmtKAzVd3ETzd6aNdbklKej6bZBq6z18pvxqLd fopJbsNzbONot3a9YpLmVcpfLgBrZ3HqxNvn0qd4= Date: Tue, 7 Jul 2020 22:29:35 -0400 From: Sasha Levin To: Pavel Machek Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Anton Eidelman , Sagi Grimberg , Christoph Hellwig Subject: Re: [PATCH 4.19 10/36] nvme: fix possible deadlock when I/O is blocked Message-ID: <20200708022935.GW2722994@sasha-vm> References: <20200707145749.130272978@linuxfoundation.org> <20200707145749.639245963@linuxfoundation.org> <20200707181641.GA6290@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200707181641.GA6290@amd> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 07, 2020 at 08:16:41PM +0200, Pavel Machek wrote: >Hi! > >> From: Sagi Grimberg >> >> [ Upstream commit 3b4b19721ec652ad2c4fe51dfbe5124212b5f581 ] >> >> Revert fab7772bfbcf ("nvme-multipath: revalidate nvme_ns_head gendisk >> in nvme_validate_ns") >> >> 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 revalidation >> takes it to check for resize (also triggered from scan_work on a different >> path). See trace [1]. >> >> 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 > >AFAICT cb224c3af4df is not applied to 4.19-stable series, so this is >not safe according to the changelog. > >cb224c3af4df is simple enough, but AFAICT >set_capacity_revalidate_and_notify() is missing in 4.19.132-rc1. Good point... It might be the case that e598a72faeb5 ("block/genhd: Notify udev about capacity change") is safe to take along with cb224c3af4df. I'll look at it once these releases are out, but for now I'll drop this commit. Thanks! -- Thanks, Sasha