Btrfs-progs: enhance btrfs qgroup to print the result as a table
authorWang Shilong <wangsl-fnst@cn.fujitsu.com>
Tue, 8 Oct 2013 16:24:02 +0000 (00:24 +0800)
committerChris Mason <chris.mason@fusionio.com>
Wed, 16 Oct 2013 12:23:12 +0000 (08:23 -0400)
commit133907d465945428d36242f8bbc9b7a5b49a26c5
treebdb8b376373117200343d3dc9a4e5aa699cf2e09
parent8ac2ddf588d0f8b9d7f055459355c801d1fd04ed
Btrfs-progs: enhance btrfs qgroup to print the result as a table

This patch enhance to print the result as a table.

You can use it like:
btrfs qgroup show <path>
However, to table the result better, we make '-p' and '-c' not present
at the same time.

For example:

btrfs qgroup show -pr <path>
The result will output as the follow format:

qgroupid rfer       excl       max_excl       parent
-------- ----       ----       --------       ------
0/265    1289752576 1289752576 0              ---
1/0      0          0          10999511627776 2/0,3/0
2/0      0          0          0              ---
3/0      0          0          0              ---

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
qgroup.c