Prevent floating point precision errors on really big filesystems from
causing the search interpolation algorithm in the icount abstraction
from looping forever.
Addresses Debian Bug: #411838
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+2007-04-02 Theodore Tso <tytso@mit.edu>
+
+ * icount.c (get_icount_el): Prevent floating point precision
+ errors on really big filesystems from causing the search
+ interpolation algorithm loop forever. (Addresses Debian
+ Bug: #411838)
+
2007-03-21 Theodore Tso <tytso@mit.edu>
* imager.c (ext2fs_image_inode_write), inode.c
range = 0;
else if (ino > highval)
range = 1;
- else
+ else {
range = ((float) (ino - lowval)) /
(highval - lowval);
+ if (range > 0.9)
+ range = 0.9;
+ if (range < 0.1)
+ range = 0.1;
+ }
mid = low + ((int) (range * (high-low)));
}
#endif