All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: Naohiro Aota <Naohiro.Aota@wdc.com>, Karel Zak <kzak@redhat.com>
Cc: "util-linux@vger.kernel.org" <util-linux@vger.kernel.org>
Subject: Re: [PATCH v2 3/3] lsblk: add zoned columns to "lsblk -z"
Date: Sun, 29 Aug 2021 23:14:04 +0000	[thread overview]
Message-ID: <DM6PR04MB70810B6213142A1CE6CFAB60E7CA9@DM6PR04MB7081.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20210827073453.4079636-4-naohiro.aota@wdc.com

On 2021/08/27 16:35, Naohiro Aota wrote:
> Add zoned columns to the "-z" option as follow.
> 
> $ lsblk -z -i
> NAME        ZONED        ZONE-SZ ZONE-NR ZONE-AMAX ZONE-OMAX ZONE-APP ZONE-GRAN
> sda         host-managed    256M   55880         0       128     672K        4K
> sdb         host-managed    256M   55880         0       128     672K        4K
> zram0       none              0B       0         0         0       0B        0B
> nvme2n1     none              0B       0         0         0       0B        0B
> |-nvme2n1p1 none              0B       0         0         0       0B        0B
> |-nvme2n1p2 none              0B       0         0         0       0B        0B
> `-nvme2n1p3 none              0B       0         0         0       0B        0B
> nvme0n1     none              0B       0         0         0       0B        0B
> nvme1n1     none              0B       0         0         0       0B        0B
> nvme0n2     host-managed      2G    1844        14        14       4M        4K
> nvme1n2     host-managed      2G    1844        14        14       4M        4K>
> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
> ---
>  misc-utils/lsblk.8.adoc | 2 +-
>  misc-utils/lsblk.c      | 8 +++++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/misc-utils/lsblk.8.adoc b/misc-utils/lsblk.8.adoc
> index 7356976403a7..9e68a847ce0c 100644
> --- a/misc-utils/lsblk.8.adoc
> +++ b/misc-utils/lsblk.8.adoc
> @@ -116,7 +116,7 @@ Specifies output width as a number of characters. The default is the number of t
>  Sort output lines by _column_. This option enables *--list* output format by default. It is possible to use the option *--tree* to force tree-like output and than the tree branches are sorted by the _column_.
>  
>  *-z*, *--zoned*::
> -Print the zone model for each device.
> +Print the zone related information for each device.
>  
>  *--sysroot* _directory_::
>  Gather data for a Linux instance other than the instance from which the *lsblk* command is issued. The specified directory is the system root of the Linux instance to be inspected. The real device nodes in the target directory can be replaced by text files with udev attributes.
> diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
> index 108c8187498e..8a2578312f0d 100644
> --- a/misc-utils/lsblk.c
> +++ b/misc-utils/lsblk.c
> @@ -1919,7 +1919,7 @@ static void __attribute__((__noreturn__)) usage(void)
>  	fputs(_(" -t, --topology       output info about topology\n"), out);
>  	fputs(_(" -w, --width <num>    specifies output width as number of characters\n"), out);
>  	fputs(_(" -x, --sort <column>  sort output by <column>\n"), out);
> -	fputs(_(" -z, --zoned          print zone model\n"), out);
> +	fputs(_(" -z, --zoned          print zone related information\n"), out);
>  	fputs(_("     --sysroot <dir>  use specified directory as system root\n"), out);
>  	fputs(USAGE_SEPARATOR, out);
>  	printf(USAGE_HELP_OPTIONS(22));
> @@ -2041,6 +2041,12 @@ int main(int argc, char *argv[])
>  		case 'z':
>  			add_uniq_column(COL_NAME);
>  			add_uniq_column(COL_ZONED);
> +			add_uniq_column(COL_ZONESIZE);
> +			add_uniq_column(COL_ZONE_NR);
> +			add_uniq_column(COL_ZONE_AMAX);
> +			add_uniq_column(COL_ZONE_OMAX);
> +			add_uniq_column(COL_ZONEAPPEND);
> +			add_uniq_column(COL_ZONEWRITEGRAN);
>  			break;
>  		case 'e':
>  			parse_excludes(optarg);
> 

Looks good, modulo the change to ZONE-WGRAN.

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>


-- 
Damien Le Moal
Western Digital Research

      reply	other threads:[~2021-08-29 23:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27  7:34 [PATCH v2 0/3] add columns for zoned parameters Naohiro Aota
2021-08-27  7:34 ` [PATCH v2 1/3] lsblk: factor out function to read sysfs param as bytes Naohiro Aota
2021-08-29 23:07   ` Damien Le Moal
2021-08-30  1:21     ` Naohiro Aota
2021-08-27  7:34 ` [PATCH v2 2/3] lsblk: add columns of zoned parameters Naohiro Aota
2021-08-29 23:10   ` Damien Le Moal
2021-08-30  1:08     ` Naohiro Aota
2021-08-30  1:50       ` Damien Le Moal
2021-08-30  5:15         ` Naohiro Aota
2021-08-29 23:15   ` Damien Le Moal
2021-08-27  7:34 ` [PATCH v2 3/3] lsblk: add zoned columns to "lsblk -z" Naohiro Aota
2021-08-29 23:14   ` Damien Le Moal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR04MB70810B6213142A1CE6CFAB60E7CA9@DM6PR04MB7081.namprd04.prod.outlook.com \
    --to=damien.lemoal@wdc.com \
    --cc=Naohiro.Aota@wdc.com \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.