Re: [PATCH] corrupted free inodes list



On Fri, 22 Dec 2006, Thomas Dickey wrote:

On Fri, 22 Dec 2006, Leonard den Ottolander wrote:

Hi Mikulas,

On Wed, 2006-12-20 at 02:15 +0100, Mikulas Patocka wrote:
--- maybe you could change double to "long long" but I'm not sure if it
exists on all machines --- a configure test would probably be needed.

Yes. Using floats for discrete counters is not such a good idea.

It's likely to be slower, but if you don't exceed the precision of the
mantissa, you won't lose information.

The general reader, taking into account the comment about "discrete" is
likely to assume that you meant information would be lost.  Since that's
not the case (for the assumed 48 bits), it's worth clarifying the comment.

I am working to get this fixed. I plan to use code from
coreutils's df to calculate the percent. I also resurrected
the files fsusage.[ch] where originally the get_fs_usage()
function resided. fsusage.[ch] come from gnulib/coreutils/filutils
and its maintainers had switched to uintmax_t to collect
the disk usage statistic for a long time now. I'll let you
know when I am done. If someone is willing to help take a
look at show_dev() in coreutils's source code. I am also
wondering whether we won't to import human.[ch] from gnulib.
IMO, it makes sense, but still this code does bit more than
what we need but maybe in the long term its worth to rely
on a known good and supported code instead of a homebrew
solution.

Please, let me know what do you think.

Thanks!



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