All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: linux-nvme@lists.infradead.org, sagi@grimberg.me, hch@lst.de
Cc: axboe@kernel.dk, Keith Busch <kbusch@kernel.org>
Subject: [PATCHv2 1/2] block: map BLK_STS_ZONE_RESOURCE to errno
Date: Tue, 15 Sep 2020 11:12:29 -0700	[thread overview]
Message-ID: <20200915181230.3674743-1-kbusch@kernel.org> (raw)

A zoned device with limited resources to open zones for writing may
return an error when the host exceeds those limits. Provide an
appropriate errno for this condition for drivers that return the zone
resource block status error when the device responds with these
conditions.

Signed-off-by: Keith Busch <kbusch@kernel.org>
---
v1->v2:

  Pick an errno to map BLK_STS_ZONE_RESOURCE

 block/blk-core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/block/blk-core.c b/block/blk-core.c
index 10c08ac50697..3594efe05117 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -186,6 +186,9 @@ static const struct {
 	/* device mapper special case, should not leak out: */
 	[BLK_STS_DM_REQUEUE]	= { -EREMCHG, "dm internal retry" },
 
+	/* too many zone resources in use */
+	[BLK_STS_ZONE_RESOURCE]	= { -ETOOMANYREFS, "zone resource exceeded" },
+
 	/* everything else not covered above: */
 	[BLK_STS_IOERR]		= { -EIO,	"I/O" },
 };
-- 
2.24.1


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

             reply	other threads:[~2020-09-15 18:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 18:12 Keith Busch [this message]
2020-09-15 18:12 ` [PATCHv2 2/2] nvme: translate zone resource errors Keith Busch
2020-09-15 23:56   ` Damien Le Moal
2020-09-16 21:00     ` Keith Busch
2020-09-17  5:48       ` hch
2020-09-17  6:14         ` Damien Le Moal
2020-09-15 23:59 ` [PATCHv2 1/2] block: map BLK_STS_ZONE_RESOURCE to errno Damien Le Moal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200915181230.3674743-1-kbusch@kernel.org \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.