Skip to contentSkip to conversation

zloop: explicitly mention zone condition when a write fails to it

PATCH Applied Christoph Hellwig 3 participants 3 messages Oct 12

Subsystems (2)
lore
Share & tools
lore

Christoph Hellwig

author reviewer
#0 lore raw

PATCH v2 1/1 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.

---

Changes since v1:
- print the zone condition

 drivers/block/zloop.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/block/zloop.c +7 -2
index 394dc2408ed7..8f485ef51557 100644
@@ -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;
 		}
Signature · 1 line
2.53.0
maintainer Applied
#2 lore raw
In reply to Christoph Hellwig
Quoted 3 lines · Christoph Hellwig

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.

Applied, thanks!

[1/1] zloop: explicitly mention zone condition when a write fails to it

      commit: a408a6e0745ab5b75bd5f1d79ae4dc73d80ea302

Best regards,

Signature · 1 line
Jens Axboe