diff options
Diffstat (limited to 'cmds-scrub.c')
-rw-r--r-- | cmds-scrub.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmds-scrub.c b/cmds-scrub.c index 95dfee33..bf506508 100644 --- a/cmds-scrub.c +++ b/cmds-scrub.c @@ -139,7 +139,6 @@ static void print_scrub_summary(struct btrfs_scrub_progress *p) { u64 err_cnt; u64 err_cnt2; - char *bytes; err_cnt = p->read_errors + p->csum_errors + @@ -151,10 +150,11 @@ static void print_scrub_summary(struct btrfs_scrub_progress *p) if (p->malloc_errors) printf("*** WARNING: memory allocation failed while scrubbing. " "results may be inaccurate\n"); - bytes = pretty_sizes(p->data_bytes_scrubbed + p->tree_bytes_scrubbed); - printf("\ttotal bytes scrubbed: %s with %llu errors\n", bytes, + + printf("\ttotal bytes scrubbed: %s with %llu errors\n", + pretty_size(p->data_bytes_scrubbed + p->tree_bytes_scrubbed), max(err_cnt, err_cnt2)); - free(bytes); + if (err_cnt || err_cnt2) { printf("\terror details:"); PRINT_SCRUB_ERROR(p->read_errors, "read"); |