e2fsck hanging

Richard Jackson rjackson at mason.gmu.edu
Tue Mar 20 13:44:07 UTC 2007


There are are few issues with the get_icount_el() code.  First a simple
binary search may be sufficient.  Also, We now know the float type is
not sufficient to handle the large or small values handled by this
code.  One problem with using float is it does not have the precision
to divide two sufficently large numbers with a small enough
difference.  The other issue is with float value approximation that
causes 'mid' to be larger than 'high'.  The approximation is due to
float single-precision 23 bit mantissa.  Values up to integer
16,777,215 are handled as expected but starting at 16,777,216 the least
significant bits are truncated producing an approximation.  The
approximation could be more or less than what is expected.  This is a
feature of using float.  Double type for IEEE 754 double-precision 64
bit provides a 52 bit mantissa to play with.  That is a large number.

Since the e2fsck code must handle large numbers the use of float type should
be used with caution.

Reference
http://steve.hollasch.net/cgindex/coding/ieeefloat.html
http://en.wikipedia.org/wiki/IEEE_754




More information about the Ext3-users mailing list