An importanta patch for glibc 2.1.1

Mark Kettenis kettenis@wins.uva.nl
Thu Apr 8 10:14:00 GMT 1999


   From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
   Date: 08 Apr 1999 14:33:08 +0200

   hjl@varesearch.com (H.J. Lu) writes:

   |> We need this patch for glibc 2.1.1.

   IMHO this patch is more appriopriate.  According to SunOS4 the f_bsize
   member of struct statfs is the "fundamental file system block size" which
   corresponds directly to f_frsize from statvfs.  Any comments?

I am not sure what "fundamental file system block size" means, but it
is very well possible that BSD and System V use the same term to mean
different things.

I am not an expert on Linux filesystems, but when I implemented
statvfs for the Hurd I also looked at the Linux ext2fs code, and it
looks to me as if the f_bsize member of struct statfs is not the
"fundamental file system block size".  Therefore I don't think your
patch is right.  

Ext2fs seems to have a concept of fragments, but that is not exported
by the kernel.  Maybe the kernel people should implement statvfs().

Meanwhile, it is probably best to either set statvfs.f_frsize = 0 (to
indicate that it is not supported, this is allowed by Unix98) or set
statvfs.f_frsize = statfs.f_bsize (pretend the "fundamental" blocksize
is equal to the "ordinary" blocksize).

Mark



More information about the Libc-hacker mailing list