mirror of
https://github.com/AltraMayor/f3.git
synced 2025-09-10 15:46:47 -04:00
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:
parent
755fdc29ff
commit
7c0306ca6f
@ -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,
|
perf_device_sample(dev, NULL, NULL, &write_count, &write_time_us,
|
||||||
&reset_count, &reset_time_us);
|
&reset_count, &reset_time_us);
|
||||||
if (!write_count || !reset_count) {
|
if (write_count < 3 || reset_count < 2) {
|
||||||
/* There is not enough measurements. */
|
/* There is not enough measurements. */
|
||||||
return (1 << 2) - 1;
|
return (1 << 2) - 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user