Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp645096rdb; Thu, 30 Nov 2023 14:28:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFTErwnq2ekE/9mltTkDbbEpMI8i0Totlh4nTtIbtwP30IMSlVH2qfyxYOzOmkAN8HNVSjl X-Received: by 2002:a05:6358:e48b:b0:16d:bc40:3055 with SMTP id by11-20020a056358e48b00b0016dbc403055mr29375576rwb.19.1701383308297; Thu, 30 Nov 2023 14:28:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701383308; cv=none; d=google.com; s=arc-20160816; b=xn4AMifFYMRTIaNWuWS+nap/tziSZvHAf5KN8EGosrmCMNyIaca6A0OhgXlXA6JOkp 5xRehY3KF1N8r+8ruPpJ5NhK+Tj5DiiD8gmMfdk5dD3UVqYsOqFXRnQkS1uVVxolRqIr 0PONLl/nFarT/cG1kewxt3Ylz1if1b2hp7zbOBLxvkONeMYxw72wlKk+vl58+fyV1+ND eMJv5TB03pbfKDgTZHupb6j9/bvW58YBfhhhLfkujep78vxEJyS3PJOSfpIHwWGiC49X mCrYbqe7koe+jgiDXBvnHT7F6qXWGeWxTIzBvVOvRxCOjB0dIOLQ+ZQISsFH3oznfREw bNMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pCd4lFCDaZ7PiW4wTVqQ114lN6MT9ckyByeLpH+GFAw=; fh=DthMgwzGMFn9gtVyBffoaw+0hToOhYzeWctwAN9TUw4=; b=i21XAZVdfK2+yTa7aCI5o2IhuRhJgB6a0RX1Tdlc9oTyyoJ32b/HRy7jKYP/LQm6bO L1Zw7VG/nIRtfswV/Pk6r6rITcTDwGpiTskul7Fx8G53z7UDeJLKy7JdEKxU0O92U590 87/RjmRQE816WS3hwmS8uVL2XFetL9w8+NLD6C70jSH35YnHHcROZbV+C8lMbakXGN0k 8QQSG4M2iPl80BkKC2rXcLLC0Ham9Y35xDfb4PDVC7QatmWiypMnW7g34J03s7SEGv/i DYKb6kafaYve6pTlPJw/A+HDjAPipsajNswsFp4s2j20uzUZIShkgsl/ppvT9ESvQb6h xrTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AS7PKpox; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id l1-20020a654481000000b00573f885c4easi2099177pgq.753.2023.11.30.14.28.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 14:28:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AS7PKpox; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id F05BC82E10B1; Thu, 30 Nov 2023 14:28:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377137AbjK3W2M (ORCPT + 99 others); Thu, 30 Nov 2023 17:28:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230203AbjK3W2L (ORCPT ); Thu, 30 Nov 2023 17:28:11 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF45610E5 for ; Thu, 30 Nov 2023 14:28:17 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1186CC433C9; Thu, 30 Nov 2023 22:28:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701383297; bh=pCd4lFCDaZ7PiW4wTVqQ114lN6MT9ckyByeLpH+GFAw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AS7PKpoxuGooLU3MtdgH2+Ev7ToehwgZt0qBOOQByGtOGBmJFJ++fB7vmlRlERSiz fKZdJsJhS7WefOPmAljGpHWBQPlS3ErIcfVOtscafQa77EAtcURW2/B6DKTstKDT6i BKWnFfcIhIA1VZRMqGntHFSfbFziQa7yhV0CtYUIMa92dz38S4lyfzNXLIEtdEY/Os tOTKwCQOuAnJn+fbRlUkc9a5SbrSOC2C5uKZxGg79hId7MwTptzEktgsBqDSNA9M8e PZ1GNEQZzyzoPtLnxkkr4oitCvy66rCfF9MHZ0fzZpJF0PkQYprC0jknftxR3YXA0K RONGnOK6Dq81g== Date: Thu, 30 Nov 2023 15:28:14 -0700 From: Keith Busch To: Bitao Hu Cc: sagi@grimberg.me, axboe@kernel.dk, hch@lst.de, kanie@linux.alibaba.com, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org Subject: Re: [PATCH v2] nvme: fix deadlock between reset and scan Message-ID: References: <1701310417-301-1-git-send-email-yaoma@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1701310417-301-1-git-send-email-yaoma@linux.alibaba.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 30 Nov 2023 14:28:26 -0800 (PST) On Thu, Nov 30, 2023 at 10:13:37AM +0800, Bitao Hu wrote: > Fix by marking the ctrl with say NVME_CTRL_FROZEN flag set in > nvme_start_freeze and cleared in nvme_unfreeze. Then the scan can check > it before adding the new namespace (under the namespaces_rwsem). Thanks for the detailed explanation. This looks good to me. Reviewed-by: Keith Busch