[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: e2fsck hanging

On Mar 13, 2007, at 9:53 AM, Theodore Tso wrote:

At a first glance your report looks vaguely like this bugreport:


I've been crazy busy the last few weeks so I haven't had a chance to
look at it yet.  There is a suggested fix in the above bug report, but
not a patch, and I haven't had time to validate it yet.


						- Ted

Yes, that's the same issue. We reduced the issue to a floating point precision issue too:

float range;
double range2;
unsigned int ino, lowval, highval;
int high, low;

lowval= 2;
highval = 732562081;

range = ((float) (ino - lowval)) / (highval - lowval);


It outputs 1.0, rather than .99999...

We're trying the suggested fix from the bug report. It'll take about 6 hours or so to get to that point. Here's specifically what we're doing:

--- e2fsprogs-1.39/lib/ext2fs/icount.c 2005-09-06 05:40:14.000000000 -0400 +++ e2fsprogs-1.39-test/lib/ext2fs/icount.c 2007-03-13 10:56:19.000000000 -0400
@@ -251,6 +251,10 @@
                                range = ((float) (ino - lowval)) /
                                        (highval - lowval);
                        mid = low + ((int) (range * (high-low)));
+                       if (mid > high)
+                               mid = high;
+                       if (mid < low)
+                               mid = low;
                if (ino == icount->list[mid].ino) {

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]