Re: e2fsck hanging

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

 



On Tue, Mar 20, 2007 at 09:44:07AM -0400, Richard Jackson wrote:
> 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.

Well, keep in mind that the float is just as an optimization to doing
a simple binary search.  So it doesn't have to be precise; an
approximation is fine, except when mid ends up being larger than high.
But it's simple enough to catch that particular case where the
division going to 1 instead of 0.99999 as we might expect.  Catching
that should be enough, I expect.

						- Ted

_______________________________________________
Ext3-users mailing list
Ext3-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux