btrfs-progs: Print more info about device sizes
authorDavid Sterba <dsterba@suse.cz>
Thu, 24 Apr 2014 16:32:27 +0000 (18:32 +0200)
committerDavid Sterba <dsterba@suse.cz>
Thu, 4 Dec 2014 15:48:11 +0000 (16:48 +0100)
commitc7b5293d8d7e3cd5c883a11f979c391fdb45230b
treecfaa3061aff52f680a012b363a902e9ae9e9e6b8
parent78f2bb9e8d89f60a9c6fbc447ebc1789ed9f3643
btrfs-progs: Print more info about device sizes

The entire device size may not be available to the filesystem, eg. if
it's modified via resize. Print this information if it can be obtained
from the DEV_INFO ioctl.

Print the device ID on the same line as the device name and move size to
the next line.

Sample:
/dev/sda7, ID: 3
   Device size:            10.00GiB
   FS occupied:             5.00GiB
   Data,RAID10:           512.00MiB
   Metadata,RAID10:       512.00MiB
   System,RAID10:           4.00MiB
   Unallocated:             9.00GiB

Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-device.c
cmds-fi-disk_usage.c
cmds-fi-disk_usage.h