zloop: explicitly mention full zone when writing to it
Subsystems (2)
Christoph Hellwig
reviewerPATCH 1/1 zloop: explicitly mention full zone when writing to it
Don't print the impossibly large write pointer, but directly mention the full zone when a write to one is received.
Signed-off-by Christoph Hellwig <[email protected]>
--- drivers/block/zloop.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/block/zloop.c +6 -2
@@ -603,8 +603,12 @@ 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 full zone: sect %llu\n" , + zone_no, 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
Damien Le Moal
maintainerQuoted 13 lines · Christoph Hellwig
Don't print the impossibly large write pointer, but directly mention the full zone when a write to one is received.
Signed-off-by Christoph Hellwig <[email protected]>--- drivers/block/zloop.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/block/zloop.c +0
-0
drivers/block/zloop.c static int zloop_seq_write_prep(struct zloop_cmd *cmd) · line 606
Quoted 6 lines
drivers/block/zloop.c +1
-2@@ -603,8 +603,12 @@ 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 )
ULLONG_MAX is used also for reporting the write pointer of read-only and offline zones. So maybe we should mention the condition here using blk_zone_cond_str() instead of hard coding "full" in the message.
drivers/block/zloop.c static int zloop_seq_write_prep(struct zloop_cmd *cmd) · line 608
Quoted 2 lines
drivers/block/zloop.c +2
-0+pr_err ("Zone %u: write to full zone: sect %llu\n" , + zone_no, cmd->sector);
pr_err("Zone %u: write to %s zone: sect %llu\n",
zone_no, blk_zone_cond_str(zone->cond),
cmd->sector);Quoted 6 lines
drivers/block/zloop.c +3
-0+else +pr_err ("Zone %u: unaligned write: sect %llu, wp %llu\n" , + zone_no, cmd->sector, zone->wp); ret = -EIO ; goto out_unlock; }
Signature · 2 lines
Damien Le Moal Western Digital Research