mirror of https://github.com/torvalds/linux.git
block: add zone write plug condition to debugfs zone_wplugs
Modify queue_zone_wplug_show() to include the condition of a zone write plug to the zone_wplugs debugfs attribute of a zoned block device. To improve readability and ease of use, rather than the zone condition raw value, the zone condition name is given using blk_zone_cond_str(). Suggested-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
2b39d4a6c6
commit
1efbbc641e
|
|
@ -2303,19 +2303,21 @@ static void queue_zone_wplug_show(struct blk_zone_wplug *zwplug,
|
||||||
unsigned int zwp_wp_offset, zwp_flags;
|
unsigned int zwp_wp_offset, zwp_flags;
|
||||||
unsigned int zwp_zone_no, zwp_ref;
|
unsigned int zwp_zone_no, zwp_ref;
|
||||||
unsigned int zwp_bio_list_size;
|
unsigned int zwp_bio_list_size;
|
||||||
|
enum blk_zone_cond zwp_cond;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&zwplug->lock, flags);
|
spin_lock_irqsave(&zwplug->lock, flags);
|
||||||
zwp_zone_no = zwplug->zone_no;
|
zwp_zone_no = zwplug->zone_no;
|
||||||
zwp_flags = zwplug->flags;
|
zwp_flags = zwplug->flags;
|
||||||
zwp_ref = refcount_read(&zwplug->ref);
|
zwp_ref = refcount_read(&zwplug->ref);
|
||||||
|
zwp_cond = zwplug->cond;
|
||||||
zwp_wp_offset = zwplug->wp_offset;
|
zwp_wp_offset = zwplug->wp_offset;
|
||||||
zwp_bio_list_size = bio_list_size(&zwplug->bio_list);
|
zwp_bio_list_size = bio_list_size(&zwplug->bio_list);
|
||||||
spin_unlock_irqrestore(&zwplug->lock, flags);
|
spin_unlock_irqrestore(&zwplug->lock, flags);
|
||||||
|
|
||||||
seq_printf(m,
|
seq_printf(m,
|
||||||
"Zone no: %u, flags: 0x%x, ref: %u, wp ofst: %u, pending BIO: %u\n",
|
"Zone no: %u, flags: 0x%x, ref: %u, cond: %s, wp ofst: %u, pending BIO: %u\n",
|
||||||
zwp_zone_no, zwp_flags, zwp_ref,
|
zwp_zone_no, zwp_flags, zwp_ref, blk_zone_cond_str(zwp_cond),
|
||||||
zwp_wp_offset, zwp_bio_list_size);
|
zwp_wp_offset, zwp_bio_list_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue