Project

General

Profile

Actions

Feature #13678

closed

Make zpool list -vp print individual vdev sizes parsable.

Added by Matt Fiddaman 8 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

From openzfs

https://github.com/openzfs/zfs/commit/bc2d809387debb95d82f47185d446f328da4d147

Add argument format to print_one_column(), and use it to call
zfs_nicenum_format with, instead of just zfs_nicenum. Don't print "%" 
for fragmentation or capacity percent values.

The calls to print_one_colum is made with ZFS_NICENUM_RAW if
cb->cb_literal (zpool list called with -p), and ZFS_NICENUM_1024 if not.

Also zpool_get_prop is modified to don't add "%" or "x" if literal.

Related issues

Related to illumos gate - Bug #8883: zpool list parsable output is inconsistentClosed2017-12-02

Actions
Actions #1

Updated by Andy Fiddaman 8 months ago

  • Status changed from New to In Progress
Actions #2

Updated by Matt Fiddaman 8 months ago

  • Related to Bug #8883: zpool list parsable output is inconsistent added
Actions #3

Updated by Electric Monk 8 months ago

  • Gerrit CR set to 1371
Actions #4

Updated by Matt Fiddaman 7 months ago

I ran the full zfs test suite before and after, and there were no differences, I also applied the patch version and ran selective commands to prove that it works as expected post-patch.

Actions #5

Updated by Electric Monk 7 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 3dfe801733ea71102fa4b1f79dddf16ee3ea546f

commit  3dfe801733ea71102fa4b1f79dddf16ee3ea546f
Author: Christer Ekholm <che@chrekh.se>
Date:   2021-05-13T04:23:20.000Z

    13678 Make zpool list -vp print individual vdev sizes parsable.
    8883 zpool list parsable output is inconsistent
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF