Message ID | 32d00d1689773fcb2a177ca3ce89a3b12c1fa4c5.1685350577.git.chunguang.xu@shopee.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1442549vqr; Mon, 29 May 2023 04:35:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6PWu2Kkgsvo1+j1eGZdOU86y0yv1mXrIr5SZ+BYnv4/Vq7h73F09FlYBWS6eK80QELnbeX X-Received: by 2002:a17:902:b782:b0:1b0:2f03:8581 with SMTP id e2-20020a170902b78200b001b02f038581mr5764889pls.44.1685360140234; Mon, 29 May 2023 04:35:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685360140; cv=none; d=google.com; s=arc-20160816; b=MsxrjYHauYy9OTyxhuN5LsYBVktcxQWVpcBFAPe3mnNGwWMglK8cn4qTl15gnskZAs rfUQuB4AVLVUjIiYO4wk+pEh+reCwDmPkOslC9OmNuivIf/8KdTU5Bxw/JRUDeQ+fH2E TLI6pJOlT89+Lnk8/QtyUIOuC9hsPDvmgS+EQf+6IoxkFiA/+EFZ0i3qgkwk/6z2/Lv/ tYlavc8wxh4MHCCc8zTA2+4JCK5tZEoFhxiKv8WqNYuDbG/7bBkiJI9fvAaqDU8wC0bP SbuZvAXKO+6bK8hZgZJbGDZU5Xc9SCxKErx3W56pZ8Cvr1YGTssHhXmy9GBIO91NCQRM mTyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=14IeKFKyO0pcEcP2T20UmiR679IiGg3A2D145C6b2n0=; b=gvrAUsTvsqqZxt4SLfJOrYfkXVeeu/BaYD0bp0Nfw4xKeWOT6XFw97FHX4JEzfg1wV GkKA2YsBKHhMKyF23nUySx6PDTVhgMb/8ZLF8dZBKeY+aOZP+ox7XRWyctrcoyPl1Tmu g5bkn818gB8A2yohQ2Dj9BKjzkAZsCTQ28wB1gc5AAa2e5jRgu9RXwf1BC0Q/s0EsYlX vpTeqvI8OUJkjxxdsi+esw7AvgzenjBMvDD+/SvAyZIxkU8c+uaxvt8/ogb4LFq15hq4 idAeNCmpqd1OxByAm4ADUNgWENQyJglyCx3VmVIC8AwtUgE+smeXo6bxJtvWpGBQDL2o WSrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=rtw4s0zc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d15-20020a170902728f00b001ae533bccc7si6980910pll.322.2023.05.29.04.35.25; Mon, 29 May 2023 04:35:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=rtw4s0zc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231550AbjE2K7o (ORCPT <rfc822;callmefire3@gmail.com> + 99 others); Mon, 29 May 2023 06:59:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231467AbjE2K7h (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 29 May 2023 06:59:37 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9A90CD for <linux-kernel@vger.kernel.org>; Mon, 29 May 2023 03:59:36 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-64fec2e0e25so190186b3a.1 for <linux-kernel@vger.kernel.org>; Mon, 29 May 2023 03:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685357976; x=1687949976; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=14IeKFKyO0pcEcP2T20UmiR679IiGg3A2D145C6b2n0=; b=rtw4s0zcr86QVVIPEt0FBcZ14qSZwrUwBbG7EXWGEcEazWjxryPP+540XqF70NitCE m4wWSIy0DTOxYr9NASRF2v7CsqTg0L+s5CnP+ocad2v8kmMkjfy+JEF/U6B8BTnhgZtX Ow+lQq2udEM8cV7mfH6vX7dLsIAwwK+FolvsM/oG5PGQ0HDbSmWenyzkbX+t4h/Avij1 bsc4V34eTOynYW/TlICn+55fQtzAVuG3fMkLrrtYHOVSBttRhYtG95miMjY5hZ0CgT+6 4wFhAJE5uba/FwMSfNzeeSPzRMNz42R8nIx6rP3ZuPXazLhAvaoXDxITLUKWpyNmItzZ 5r3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685357976; x=1687949976; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=14IeKFKyO0pcEcP2T20UmiR679IiGg3A2D145C6b2n0=; b=k9smefYk0XomFJsbnWrrDhAuqQmsZxVQ4BjKPpxopkb7DUW6oVQaUCjnIjF5vZT77i YnMWWWT0idx841GTheoaz4iCI9s7IRpFJAUPBoiZrrzCDZLcAWx7bKTmSwFCJz6dcYps ckWpAxwWL5RLghczqInRyVFlB3T2JLJmROwdUaVbox8o+YzfRM1IkUaTwGfFw56t3enj IiWXWsTnMJFAww2qHdGx5npS8Es1QpifCYs+lp2iNwOOXoXkZSLzQdjhGuscDCSAfm7p MHNX2MXz3Yau5oofmzZQXyGPUC7PfKVpV7PNQnJD3uFcAKysB+80XrQFKskEa0HZfyWN uTCA== X-Gm-Message-State: AC+VfDwwX8n+VgORXZqwYsTliMTG5yVIUqxa86DBp7S8tojWyQQBxMER ruprnUm1nP0TOQQ2wLT3WQk= X-Received: by 2002:a05:6a20:8428:b0:10c:b441:5bd3 with SMTP id c40-20020a056a20842800b0010cb4415bd3mr8901649pzd.11.1685357976278; Mon, 29 May 2023 03:59:36 -0700 (PDT) Received: from localhost.localdomain ([143.92.64.20]) by smtp.gmail.com with ESMTPSA id v7-20020a63d547000000b0053f22b76cdcsm6863110pgi.82.2023.05.29.03.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 03:59:35 -0700 (PDT) From: "brookxu.cn" <brookxu.cn@gmail.com> To: kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 3/4] nvme: optimize nvme_check_ready() for NVME_CTRL_DELETING_NOIO Date: Mon, 29 May 2023 18:59:25 +0800 Message-Id: <32d00d1689773fcb2a177ca3ce89a3b12c1fa4c5.1685350577.git.chunguang.xu@shopee.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <cover.1685350577.git.chunguang.xu@shopee.com> References: <cover.1685350577.git.chunguang.xu@shopee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767228194417833758?= X-GMAIL-MSGID: =?utf-8?q?1767228194417833758?= |
Series |
nvme-tcp: fix hung issues for deleting
|
|
Commit Message
许春光
May 29, 2023, 10:59 a.m. UTC
From: Chunguang Xu <chunguang.xu@shopee.com> nvme_check_ready() will directly return queue_alive while controller is NVME_CTRL_DELETING, maybe we should do the same things for NVME_CTRL_DELETING_NOIO. Signed-off-by: Chunguang Xu <chunguang.xu@shopee.com> --- drivers/nvme/host/nvme.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index a2d4f59e0535..35066ad10cd9 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -793,7 +793,8 @@ static inline bool nvme_check_ready(struct nvme_ctrl *ctrl, struct request *rq, if (likely(ctrl->state == NVME_CTRL_LIVE)) return true; if (ctrl->ops->flags & NVME_F_FABRICS && - ctrl->state == NVME_CTRL_DELETING) + (ctrl->state == NVME_CTRL_DELETING || + ctrl->state == NVME_CTRL_DELETING_NOIO)) return queue_live; return __nvme_check_ready(ctrl, rq, queue_live); }