zloop: explicitly mention zone condition when a write fails to it
Subsystems (2)
Christoph Hellwig
reviewerPATCH 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.
Signed-off-by Christoph Hellwig <[email protected]>
---
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
@@ -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
Quoted 5 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.
Signed-off-by Christoph Hellwig <[email protected]>
Looks good.
Reviewed-by Damien Le Moal <[email protected]>
Signature · 2 lines
Damien Le Moal Western Digital Research
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