All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 1/2] block: map BLK_STS_ZONE_RESOURCE to errno
@ 2020-09-15 18:12 Keith Busch
  2020-09-15 18:12 ` [PATCHv2 2/2] nvme: translate zone resource errors Keith Busch
  2020-09-15 23:59 ` [PATCHv2 1/2] block: map BLK_STS_ZONE_RESOURCE to errno Damien Le Moal
  0 siblings, 2 replies; 7+ messages in thread
From: Keith Busch @ 2020-09-15 18:12 UTC (permalink / raw)
  To: linux-nvme, sagi, hch; +Cc: axboe, Keith Busch

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-17  6:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-15 18:12 [PATCHv2 1/2] block: map BLK_STS_ZONE_RESOURCE to errno Keith Busch
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

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.