[PATCH v2 13/15] block: add zone write plug condition to debugfs zone_wplugs

Johannes Thumshirn Johannes.Thumshirn at wdc.com
Mon Nov 3 07:23:24 PST 2025


On 11/3/25 2:39 PM, Damien Le Moal wrote:
> 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.
>
> Signed-off-by: Damien Le Moal <dlemoal at kernel.org>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
> ---
>   block/blk-zoned.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/block/blk-zoned.c b/block/blk-zoned.c
> index 8773af89980d..07553bde7b33 100644
> --- a/block/blk-zoned.c
> +++ b/block/blk-zoned.c
> @@ -2293,19 +2293,21 @@ static void queue_zone_wplug_show(struct blk_zone_wplug *zwplug,
>   	unsigned int zwp_wp_offset, zwp_flags;
>   	unsigned int zwp_zone_no, zwp_ref;
>   	unsigned int zwp_bio_list_size;
> +	unsigned int zwp_cond;
>   	unsigned long flags;
>   
>   	spin_lock_irqsave(&zwplug->lock, flags);
>   	zwp_zone_no = zwplug->zone_no;
>   	zwp_flags = zwplug->flags;
>   	zwp_ref = refcount_read(&zwplug->ref);
> +	zwp_cond = zwplug->cond;
>   	zwp_wp_offset = zwplug->wp_offset;
>   	zwp_bio_list_size = bio_list_size(&zwplug->bio_list);
>   	spin_unlock_irqrestore(&zwplug->lock, flags);
>   
>   	seq_printf(m,
> -		"Zone no: %u, flags: 0x%x, ref: %u, wp ofst: %u, pending BIO: %u\n",
> -		zwp_zone_no, zwp_flags, zwp_ref,
> +		"Zone no: %u, flags: 0x%x, ref: %u, cond: 0x%x, wp ofst: %u, pending BIO: %u\n",
> +		zwp_zone_no, zwp_flags, zwp_ref, zwp_cond,
>   		zwp_wp_offset, zwp_bio_list_size);
>   }
>   

I'd personally prefer a non-numerical representation of the zone 
condition. This makes quick debugging much easier than having to look up 
the numbers in blkdev.h.



More information about the Linux-nvme mailing list