btrfs-progs/cmds
David Sterba 7e0f506241 btrfs-progs: scrub status: fix rate units
There's a special case when scrub rate is printed, the device sizes and
rate use different units. The size can be in terabytes while the rate
can be in hundreds of megabytes (contemporary 10-20T disks, 250MB/s).

The sizes use what is set on command line (or human readable by
default), while the rate is always human readable with exception to
the option --raw to provide a way to print the exact numbers without any
conversions.

This got broken in commit ec3c842859 ("btrfs-progs: scrub status:
with --si, show rate in metric units") that forced the command line mode
to the rate as well.

Instead of that we need to detect the SI/IEC mode and set it to the
human readable format of rate.

Signed-off-by: David Sterba <dsterba@suse.com>
2025-02-15 00:08:32 +01:00
..
balance.c btrfs-progs: drop _fd from btrfs_open_dir_fd() 2024-02-20 12:56:24 +01:00
commands.h btrfs-progs: use unsigned type for bit shift values 2023-11-03 18:04:37 +01:00
device.c btrfs-progs: device add: update --nodiscard spec to take no argument 2025-02-11 20:43:28 +01:00
filesystem-du.c btrfs-progs: rename btrfs_open_fd2() to btrfs_open_path() 2024-02-20 12:59:29 +01:00
filesystem-usage.c btrfs-progs: reorder key initializations 2024-04-30 21:49:15 +02:00
filesystem-usage.h btrfs-progs: clean up includes 2025-01-16 19:13:26 +01:00
filesystem.c btrfs-progs: fi resize: warn if new size is < 256M 2024-09-17 16:19:03 +02:00
inspect-dump-super.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
inspect-dump-tree.c btrfs-progs: reorder key initializations 2024-04-30 21:49:15 +02:00
inspect-tree-stats.c btrfs-progs: tree-stats: unify setting raw/bytes options 2024-07-30 19:53:33 +02:00
inspect.c btrfs-progs: use proper path buffer in __ino_to_path_fd() 2024-07-30 20:04:38 +02:00
property.c btrfs-progs: property set: fix typo in help message 2024-04-30 19:34:52 +02:00
props.h btrfs-progs: clean up includes 2025-01-16 19:13:26 +01:00
qgroup.c btrfs-progs: qgroup clear-stale: check if qgroup enabled first 2025-02-11 20:43:28 +01:00
qgroup.h btrfs-progs: remove unused qgroup functions 2024-09-17 17:00:03 +02:00
quota.c btrfs-progs: drop _fd from btrfs_open_dir_fd() 2024-02-20 12:56:24 +01:00
receive-dump.c btrfs-progs: factor string escaping helpers from receive dump 2024-07-30 19:53:33 +02:00
receive-dump.h btrfs-progs: cmds: update include lists 2022-10-11 09:07:59 +02:00
receive.c btrfs-progs: receive: make option quiet work for chroot 2024-11-26 21:05:34 +01:00
reflink.c btrfs-progs: clean up includes 2025-01-16 19:13:26 +01:00
replace.c btrfs-progs: use strncpy_null everywhere 2024-06-24 19:18:48 +02:00
rescue-chunk-recover.c btrfs-progs: reorder key initializations 2024-04-30 21:49:15 +02:00
rescue-super-recover.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
rescue.c btrfs-progs: fix a false failure for inode cache cleanup 2024-09-17 14:33:22 +02:00
rescue.h btrfs-progs: unify GPL header comments 2021-09-07 13:58:44 +02:00
restore.c btrfs-progs: use strncpy_null everywhere 2024-06-24 19:18:48 +02:00
scrub.c btrfs-progs: scrub status: fix rate units 2025-02-15 00:08:32 +01:00
send.c btrfs-progs: use get_sysfs_proto_supported() in get_sysfs_proto_supported() 2023-12-01 01:58:56 +01:00
subvolume-list.c btrfs-progs: subvol list: fix accidental trimming of subvolume name 2024-06-25 17:42:12 +02:00
subvolume.c btrfs-progs: subvolume snapshot: use libbtrfsutil for snapshot 2024-09-17 17:00:03 +02:00
subvolume.h btrfs-progs: subvol: introduce rowspec definition for json output 2023-08-28 17:24:23 +02:00