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=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 A1F08C43463 for ; Thu, 17 Sep 2020 23:19:02 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 141CC2085B for ; Thu, 17 Sep 2020 23:19:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Cn9+XzWK"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ofz0qOD3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 141CC2085B 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MSFjbohV2YAkNv+6OAw8TZIXqmgQOKkCswhY4gfQFcU=; b=Cn9+XzWKnmoJoD0ItuT/zAoqm +g0PvjP1ayK7rFug+Y1kyXILVG3DE2sJJqo/N+zKDh9F1y2ObnnI0Q2hqfZGhoNi/oICEC+4Q7e6E vnFImKxEfVqMXz61Aa1LvqPHx2JUFZCyqbA2YkW+equ8NiFzAFGA4zorIXDKKc3+GsjD/DPXC5YBW gxZJRclFjVeivaSv+GaL8L+1Kukd0QR1cbQnxosqsbc9L5SxpfCSCVdF86aBLEzR03CiXv+uycToD dkqfluua1YoLrIqyieLNQou1Bs23Q1QbESnycp7lWLTI7OnnT4tUJBi2lhPALh1gbPjANZ+HtlFtQ zjMtBDiBw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJ3B1-0008RT-6U; Thu, 17 Sep 2020 23:18:55 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJ3Ay-0008PT-63 for linux-nvme@lists.infradead.org; Thu, 17 Sep 2020 23:18:53 +0000 Received: from dhcp-10-100-145-180.wdl.wdc.com (unknown [199.255.45.60]) (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 F1AE220870; Thu, 17 Sep 2020 23:18:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600384730; bh=jfma3X7pilb5Fg1ZcDsNgNV8kAHXdod6ppTdWMc8RNo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ofz0qOD3l9X33Kcfw7NbvkmdAyr24FL7eNh/2umKkDo7vHaNwKCCu0+iFKD8h2wNN 36u5GrK1w/S4OPQHLsi1N9JHIKO9Pg+tALI2DeGR/KyyAGRpEYQ7yyMd8+5cnDwtfN 16HgroN2pOrrI7GYatIf4qGod2C4B5iTNqEaiskU= From: Keith Busch To: linux-nvme@lists.infradead.org, sagi@grimberg.me, hch@lst.de, linux-block@vger.kernel.org Subject: [PATCHv3 2/4] nvme: translate zone resource errors Date: Thu, 17 Sep 2020 16:18:39 -0700 Message-Id: <20200917231841.4029747-3-kbusch@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200917231841.4029747-1-kbusch@kernel.org> References: <20200917231841.4029747-1-kbusch@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200917_191852_446096_33204AA3 X-CRM114-Status: GOOD ( 11.11 ) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: axboe@kernel.dk, Damien Le Moal , linux-scsi@vger.kernel.org, martin.petersen@oracle.com, Johannes Thumshirn , Keith Busch 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 Translate zoned resource errors to the appropriate blk_status_t. Cc: Christoph Hellwig Cc: Damien Le Moal Cc: Johannes Thumshirn Signed-off-by: Keith Busch --- drivers/nvme/host/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 614cd455836b..a0d26fcbf923 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -236,6 +236,10 @@ static blk_status_t nvme_error_status(u16 status) return BLK_STS_NEXUS; case NVME_SC_HOST_PATH_ERROR: return BLK_STS_TRANSPORT; + case NVME_SC_ZONE_TOO_MANY_ACTIVE: + return BLK_STS_ZONE_ACTIVE_RESOURCE; + case NVME_SC_ZONE_TOO_MANY_OPEN: + return BLK_STS_ZONE_OPEN_RESOURCE; default: return BLK_STS_IOERR; } -- 2.24.1 _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme