Fix some misuses of MiB and MB

This commit is contained in:
Andrea Mazzoleni 2016-01-16 07:56:52 +01:00
parent eaa89473b4
commit f3046b4053
2 changed files with 4 additions and 4 deletions

View file

@ -162,7 +162,7 @@ void speed(int period)
printf("Speed test using %u data buffers of %u bytes, for a total of %u KiB.\n", nd, size, nd * size / 1024);
printf("Memory blocks have a displacement of %u bytes to improve cache performance.\n", RAID_MALLOC_DISPLACEMENT);
printf("The reported values are the aggregate bandwidth of all data blocks in MiB/s,\n");
printf("The reported values are the aggregate bandwidth of all data blocks in MB/s,\n");
printf("not counting parity blocks.\n");
printf("\n");

View file

@ -3956,7 +3956,7 @@ int state_progress(struct snapraid_state* state, block_off_t blockpos, block_off
delta_tick_total = tick_total - state->progress_tick_total[oldest];
delta_tick_cpu = tick_cpu - state->progress_tick_cpu[oldest];
/* estimate the speed in MiB/s */
/* estimate the speed in MB/s */
if (delta_time != 0)
out_speed = (unsigned)(delta_size / MEGA / delta_time);
@ -3973,9 +3973,9 @@ int state_progress(struct snapraid_state* state, block_off_t blockpos, block_off
log_tag("run:pos:%u:%u:%" PRIu64 ":%u:%u:%u:%u:%" PRIu64 "\n", blockpos, countpos, countsize, out_perc, out_eta, out_speed, out_cpu, (uint64_t)elapsed);
log_flush();
} else {
msg_bar("%u%%, %u MiB", out_perc, (unsigned)(countsize / MEGA));
msg_bar("%u%%, %u MB", out_perc, (unsigned)(countsize / MEGA));
if (out_speed)
msg_bar(", %u MiB/s", out_speed);
msg_bar(", %u MB/s", out_speed);
if (out_cpu)
msg_bar(", CPU %u%%", out_cpu);
if (out_eta)