btrfs-progs/cmds
David Sterba cbe239bf71 btrfs-progs: fi usage: sort table by device id
The result of 'btrfs fi usate -T' looks strange when the devices are
sorted by path and not by id. It's harder to lookup and the device id
reflects "the order of appearance" in the filesystem.

Original output:
              Data      Metadata  System
Id Path       RAID0     RAID1     RAID1    Unallocated
-- ---------- --------- --------- -------- -----------
 6 /dev/loop0 204.75MiB         -        -     1.80GiB
 3 /dev/loop1 204.75MiB         -        -     1.80GiB
 8 /dev/loop2 204.75MiB 256.00MiB  8.00MiB     1.54GiB
 1 /dev/loop3 204.75MiB         -        -     1.80GiB
 5 /dev/loop4 204.75MiB         -        -     1.80GiB
 4 /dev/loop5 204.75MiB         -        -     1.80GiB
 2 /dev/loop6 204.75MiB         -        -     1.80GiB
 7 /dev/loop7 204.75MiB 256.00MiB  8.00MiB     1.54GiB
-- ---------- --------- --------- -------- -----------
   Total        1.60GiB 256.00MiB  8.00MiB    13.88GiB
   Used           0.00B 112.00KiB 16.00KiB

New output:

              Data      Metadata  System
Id Path       RAID0     RAID1     RAID1    Unallocated
-- ---------- --------- --------- -------- -----------
 1 /dev/loop3 204.75MiB         -        -     1.80GiB
 2 /dev/loop6 204.75MiB         -        -     1.80GiB
 3 /dev/loop1 204.75MiB         -        -     1.80GiB
 4 /dev/loop5 204.75MiB         -        -     1.80GiB
 5 /dev/loop4 204.75MiB         -        -     1.80GiB
 6 /dev/loop0 204.75MiB         -        -     1.80GiB
 7 /dev/loop7 204.75MiB 256.00MiB  8.00MiB     1.54GiB
 8 /dev/loop2 204.75MiB 256.00MiB  8.00MiB     1.54GiB
-- ---------- --------- --------- -------- -----------
   Total        1.60GiB 256.00MiB  8.00MiB    13.88GiB
   Used           0.00B 112.00KiB 16.00KiB

Signed-off-by: David Sterba <dsterba@suse.com>
2019-11-22 19:07:21 +01:00
..
balance.c btrfs-progs: balance status: fix usage show long verbose 2019-11-18 19:21:09 +01:00
commands.h btrfs-progs: help: define helper for command with flags 2019-07-03 20:49:04 +02:00
device.c btrfs-progs: utils: split device scanning functions to own file 2019-07-04 02:06:34 +02:00
filesystem-du.c btrfs-progs: fix helpinfo formats, short and options separation 2019-07-03 20:49:04 +02:00
filesystem-usage.c btrfs-progs: fi usage: sort table by device id 2019-11-22 19:07:21 +01:00
filesystem-usage.h btrfs-progs: move all cmds-fi*.c to cmds/ 2019-07-03 20:49:03 +02:00
filesystem.c btrfs-progs: utils: split device scanning functions to own file 2019-07-04 02:06:34 +02:00
inspect-dump-super.c btrfs-progs: add blake2b support 2019-11-18 19:21:06 +01:00
inspect-dump-tree.c btrfs-progs: dump-tree: update help and docs regarding DFS/BFS 2019-10-14 17:27:31 +02:00
inspect-tree-stats.c btrfs-progs: fix helpinfo formats, short and options separation 2019-07-03 20:49:04 +02:00
inspect.c btrfs-progs: fix helpinfo formats, short and options separation 2019-07-03 20:49:04 +02:00
property.c btrfs-progs: props: update help texts 2019-07-26 17:46:42 +02:00
qgroup.c btrfs-progs: qgroups: use parse_size instead of open coding it 2019-10-14 17:27:46 +02:00
quota.c btrfs-progs: move utils.[ch] to common/ 2019-07-03 20:49:04 +02:00
receive.c btrfs-progs: receive: make option quiet work 2019-11-18 19:21:08 +01:00
replace.c btrfs-progs: utils: split device handling functions to own file 2019-07-04 02:06:34 +02:00
rescue-chunk-recover.c btrfs-progs: Replace btrfs_block_group_cache::item with dedicated members 2019-11-18 19:21:09 +01:00
rescue-super-recover.c btrfs-progs: move crc32c implementation to crypto/ 2019-11-18 19:20:02 +01:00
rescue.c btrfs-progs: fix helpinfo formats, short and options separation 2019-07-03 20:49:04 +02:00
rescue.h btrfs-progs: move cmds-rescue.c to cmds/ 2019-07-03 20:49:02 +02:00
restore.c btrfs-progs: restore: fix chown of a symlink 2019-07-26 17:46:43 +02:00
scrub.c btrfs-progs: scrub: fix status lines alignment 2019-07-26 17:46:43 +02:00
send.c btrfs-progs: utils: split path related utils to own file 2019-07-04 02:06:31 +02:00
subvolume.c btrfs-progs: utils: split device scanning functions to own file 2019-07-04 02:06:34 +02:00