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=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 40A4AC4332D for ; Wed, 17 Mar 2021 01:01:50 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 C819664FC0 for ; Wed, 17 Mar 2021 01:01:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C819664FC0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+znQsby9QQxtMJloW1BpFSFYtwV9XSu0LH97/iXHBVk=; b=eLwZik6Ym6IN4EipT8AtgHxni oD9p4oSWd4kHZ09LwU8ZRfeMOl+rgQ48CQQ3WX/P2siuXy+nLCmc7CE+Dznne/AYU/I47VKORjCqV Ujif0XAgTp+IJMPE4Nq5tEX1eQqn8Ux6S6racT7l8ie3tQCXvbR8bT4G1ZgceOUop6s/rMOBRtGgD sabKWSgye0hJ4jU9dSFE8WYvXY9n9lMzq53j+NDpmcGhw7I9PWRdFSLcNyTBeXEq3oIK6yP+qrZEn YkbsIyftaEmbPf3ogbFl/vtT/15NfBNiv1BgKiyUOVgIiWGD3eGe/OygFdsg9TWDjVoW4UC39j5AH wmE2BYo9w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lMKZ9-0028cA-00; Wed, 17 Mar 2021 01:01:39 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lMKVR-0027EZ-Rg for linux-nvme@lists.infradead.org; Wed, 17 Mar 2021 00:57:53 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2BD3164FE6; Wed, 17 Mar 2021 00:57:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615942668; bh=tYjGZQ3A/9doDNTjdj/vhCflGKISs1dWpYUHS0Px9kA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kSjJeYt2nOz8OwGIFurOkHbgQXNYLK1txVi9QLdv/ppz+6NfCI7kqtrdNF2CM21Ok yvk2vEfTIfdu5l5Q2Jq/uIdPJI/zXwhuGxPQrAhrTSqKFVBo5AN6Y5Q8HwjcE8osQ/ 1JGtAFKAfalNqPeoh18RN/mj/SnezjpSfH7cIU/5Qxb2xjh3PzLqOUsulx0mgQ2Fey TlLqbmn6Zsa5APp3yYZCTMa21JSG8fj+IB4Y3KX2IM0+35FOVWTX3awB8198jOluaG EcNe5nIxUIzTIc/5qyOkn18qiKKNHaaqSbLrO227YHfIJyF1GWgHfiYYNeURBX7m2o bByrnY0QQNLSw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hannes Reinecke , Keith Busch , Sagi Grimberg , Chao Leng , Daniel Wagner , Christoph Hellwig , Sasha Levin , linux-nvme@lists.infradead.org Subject: [PATCH AUTOSEL 5.10 44/54] nvme: add NVME_REQ_CANCELLED flag in nvme_cancel_request() Date: Tue, 16 Mar 2021 20:56:43 -0400 Message-Id: <20210317005654.724862-44-sashal@kernel.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210317005654.724862-1-sashal@kernel.org> References: <20210317005654.724862-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210317_005750_368738_2D1C2ABF X-CRM114-Status: UNSURE ( 9.58 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 From: Hannes Reinecke [ Upstream commit d3589381987ec879b03f8ce3039df57e87f05901 ] NVME_REQ_CANCELLED is translated into -EINTR in nvme_submit_sync_cmd(), so we should be setting this flags during nvme_cancel_request() to ensure that the callers to nvme_submit_sync_cmd() will get the correct error code when the controller is reset. Signed-off-by: Hannes Reinecke Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chao Leng Reviewed-by: Daniel Wagner Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- drivers/nvme/host/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 990e1adafaad..a684168fa4a3 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -346,6 +346,7 @@ bool nvme_cancel_request(struct request *req, void *data, bool reserved) return true; nvme_req(req)->status = NVME_SC_HOST_ABORTED_CMD; + nvme_req(req)->flags |= NVME_REQ_CANCELLED; blk_mq_complete_request(req); return true; } -- 2.30.1 _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme