btrfs-progs: fi usage: swap order of Used and zoned information

The Used and Free should be together, while all the device information
is in the first section.

Example:

  Overall:
      Device size:                 128.00GiB
      Device allocated:             24.00GiB
      Device unallocated:          104.00GiB
      Device missing:                  0.00B
      Device zone unusable:          5.13MiB
      Device zone size:            256.00MiB
      Used:                        213.33MiB
      Free (estimated):            111.79GiB      (min: 111.79GiB)
      Free (statfs, df):           111.79GiB
      Data ratio:                       1.00
      Metadata ratio:                   1.00
      Global reserve:               25.58MiB      (used: 16.00KiB)
      Multiple profiles:                  no

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2021-06-24 23:04:59 +02:00
parent a410805acc
commit 96aedd1121
1 changed files with 2 additions and 2 deletions

View File

@ -621,8 +621,6 @@ static int print_filesystem_usage_overall(int fd, struct chunk_info *chunkinfo,
pretty_size_mode(r_total_unused, unit_mode | UNITS_NEGATIVE));
printf(" Device missing:\t\t%*s\n", width,
pretty_size_mode(r_total_missing, unit_mode));
printf(" Used:\t\t\t%*s\n", width,
pretty_size_mode(r_total_used, unit_mode));
ret = ioctl(fd, BTRFS_IOC_GET_FEATURES, &feature_flags);
if (ret == 0 && (feature_flags.incompat_flags & BTRFS_FEATURE_INCOMPAT_ZONED)) {
u64 zone_size;
@ -633,6 +631,8 @@ static int print_filesystem_usage_overall(int fd, struct chunk_info *chunkinfo,
printf(" Device zone size:\t\t%*s\n", width,
pretty_size_mode(zone_size, unit_mode));
}
printf(" Used:\t\t\t%*s\n", width,
pretty_size_mode(r_total_used, unit_mode));
printf(" Free (estimated):\t\t%*s\t(",
width,
pretty_size_mode(free_estimated, unit_mode));