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

Re: [MiNT] du bug



On Tue, Apr 18, 2000 at 05:33:19PM +0200, Frank Naumann wrote:
> Hello!
> 
> > That means, you've effectively changed the meaning of XATTR.nblocks,
> > instead of Guido fixing *stat() in the MiNT Lib? I can't believe that
> > ...
> 
> Yes, that's what I done. Under this point only ext2 was effectivly buggy
> as it returns xattr.nblocks in 512 Byte blocks.

There was a little to and fro with regard to stat().  AFAIR the MiNTLib
currently passes all block stuff unchanged to the application.  But I must
admit that I forgot to check that in the final release.

I think there should be an update for the MiNTLib anyway.  By accident
__time_t is currently defined as __int32_t instead of long in
<bits/types.h>.  Not really a bug but at least mgetty (and probably
others) assume that time_t is long, not int.

I would therefore propose that Frank adds a patch for the block stuff to
stat and friends before the fileutils get recompiled.  But attention, the
filesystem's block size is now the initial default value for buffered
stdio.  If that doesn't fit, then stdio/sysd-stdio.c has to get changed,
too (maybe something like "if (blksize < 1024) ...").

Furthermore there was a little confusion about the meaning of the
st_blksize member of struct stat.  The Linux manpage stat(2) says that
"st_blksize gives the 'preferred' block size for efficient file system
I/O".  Another possible interpretation is the "real" blocksize that the
filesystem uses.

Consequently, the st_blksize of the ext2 filesystem under Linux is always
equal to the page size (according to Frank's look in the ext2
sources) and in the end I was too confused to remember what meaning
st_blksize has in MiNT (both in Fxattr and Fstat64).

No matter what you decide to do, please keep in mind that the result
affects the performance of the MiNTLib stdio and change sysd-stdio.c if
necessary.

Ciao

Guido
-- 
http://stud.uni-saarland.de/
Send your spam to president@whitehouse.gov and your replies to
mailto:guido at freemint dot de