Skip to content

Commit

Permalink
f3probe: avoid hanging before the second reset
Browse files Browse the repository at this point in the history
f3probe was writing too many blocks between
the first and the second reset due to
a poor estimate of the writing and reseting times.
  • Loading branch information
AltraMayor committed Dec 24, 2014
1 parent 755fdc2 commit 7c0306c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7c0306c

Please sign in to comment.