Skip to content

Commit

Permalink
btrfs-progs: scrub status: with --si, show rate in metric units
Browse files Browse the repository at this point in the history
This makes btrfs scrub status --si show the Rate in metric units as well.

Before:

Total to scrub:   877.65GB
Rate:             609.22MiB/s

After:

Total to scrub:   877.65GB
Rate:             638.81MB/s

Pull-request: kdave#832
Author: Ivan Kozik <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
ivan authored and kdave committed Jul 30, 2024
1 parent 5c32511 commit ec3c842
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmds/scrub.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ static void print_scrub_summary(struct btrfs_scrub_progress *p, struct scrub_sta
pr_verbose(LOG_DEFAULT, "\n");
} else {
pr_verbose(LOG_DEFAULT, "Rate: %s/s",
pretty_size(bytes_per_sec));
pretty_size_mode(bytes_per_sec, unit_mode));
if (limit > 1)
pr_verbose(LOG_DEFAULT, " (limit %s/s)",
pretty_size(limit));
pretty_size_mode(limit, unit_mode));
else if (limit == 1)
pr_verbose(LOG_DEFAULT, " (some device limits set)");
pr_verbose(LOG_DEFAULT, "\n");
Expand Down

0 comments on commit ec3c842

Please sign in to comment.