As it stands today, if no_change_count++ isn't > 10,
we will reset it to 0. There's no way to get above 1
(let alone 10) so this isn't working as intended.
If we see progress (last_forkoff != tbstat.bs_forkoff)
*then* we sould reset the no_change_count counter to 0.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
if (last_forkoff == tbstat.bs_forkoff) {
if (no_change_cnt++ > 10)
break;
- }
- no_change_cnt = 0;
+ } else /* progress! */
+ no_change_cnt = 0;
last_forkoff = tbstat.bs_forkoff;
/* work out which way to grow the fork */