From a408a6e0745ab5b75bd5f1d79ae4dc73d80ea302 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 12 Oct 2026 16:15:34 +0200 Subject: [PATCH] zloop: explicitly mention zone condition when a write fails to it 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 Reviewed-by: Damien Le Moal Link: https://patch.msgid.link/20261012141551.1336261-1-hch@lst.de Signed-off-by: Jens Axboe --- 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 f0ca221524db..509d9727835d 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; }