f3probe: avoid hanging before the second reset

f3probe was writing too many blocks between
the first and the second reset due to
a poor estimate of the writing and reseting times.
This commit is contained in:
Michel Machado 2014-12-24 12:10:47 -03:00
parent 755fdc29ff
commit 7c0306ca6f

View File

@ -122,7 +122,7 @@ static uint64_t estimate_best_n_block(struct device *dev)
perf_device_sample(dev, NULL, NULL, &write_count, &write_time_us,
&reset_count, &reset_time_us);
if (!write_count || !reset_count) {
if (write_count < 3 || reset_count < 2) {
/* There is not enough measurements. */
return (1 << 2) - 1;
}