On Tue, 3 Nov 1998, Martin H. VanLeeuwen wrote:
> Looks like a negative counter?
thanks, indeed it was a negative number, and i think i have nailed the
problem:
/*
* We do not want to overflow, so the order of operands and
* the * 100 / 100 trick are important. We do a +1 to be
* safe against division by zero. We only estimate anyway.
*
* dt: time until now
* tt: total time
* et: estimated finish time
*/
dt = ((jiffies - mddev->resync_start) / HZ);
tt = (dt * (max_blocks / (resync/100+1)))/100;
if (tt > dt)
et = tt - dt;
else
/*
* ignore rounding effects near finish time
*/
et = 0;
sz += sprintf(page + sz, " finish=%u.%umin", et / 60, (et % 60)/6);
this will show up in the next release.
> ought to be a bunny, i just haven't looked at code yet, is it
> worth the fix?
definitely :)
-- mingo