Linux block layer
 help / color / mirror / Atom feed
* [PATCH v2] zloop: explicitly mention zone condition when a write fails to it
@ 2026-10-12 14:15 Christoph Hellwig
  2026-10-12 14:19 ` Damien Le Moal
  2026-10-12 18:51 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2026-10-12 14:15 UTC (permalink / raw)
  To: axboe, dlemoal; +Cc: linux-block

Don't print the impossibly large write pointer, but directly mention
the zone condition when a write to a zone in a condition that does
not allow writes is received.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---

Changes since v1:
 - print the zone condition

 drivers/block/zloop.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/block/zloop.c b/drivers/block/zloop.c
index 394dc2408ed7..8f485ef51557 100644
--- a/drivers/block/zloop.c
+++ b/drivers/block/zloop.c
@@ -603,8 +603,13 @@ static int zloop_seq_write_prep(struct zloop_cmd *cmd)
 		}
 	} else {
 		if (cmd->sector != zone->wp) {
-			pr_err("Zone %u: unaligned write: sect %llu, wp %llu\n",
-			       zone_no, cmd->sector, zone->wp);
+			if (zone->wp == ULLONG_MAX)
+				pr_err("Zone %u: write to %s zone: sect %llu\n",
+				       zone_no, blk_zone_cond_str(zone->cond),
+				       cmd->sector);
+			else
+				pr_err("Zone %u: unaligned write: sect %llu, wp %llu\n",
+				       zone_no, cmd->sector, zone->wp);
 			ret = -EIO;
 			goto out_unlock;
 		}
-- 
2.53.0


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

end of thread, other threads:[~2026-10-12 18:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-12 14:15 [PATCH v2] zloop: explicitly mention zone condition when a write fails to it Christoph Hellwig
2026-10-12 14:19 ` Damien Le Moal
2026-10-12 18:51 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox