This is the mail archive of the libc-hacker@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: An importanta patch for glibc 2.1.1


   From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
   Date: 09 Apr 1999 09:37:20 +0200

   |> Why do we have to follow SunOS4?

   Because Linux is similar.

Not necessarily, what Linux returns in statfs.f_bsize is not
necessarily he smallest possible block that is manipulated by the
filesystem.  So in my view it is not the "fundamental" filesystem
block size.

   Please think about it again.

I think any solution is fine as long as

  statfs.f_bsize * statfs.f_blocks == statvfs.f_frsize * statvfs.f_blocks

or, if we set statvfs.f_frsize = 0:

  statfs.f_bsize * statfs.f_blocks == statvfs.f_bsize * statvfs.f_blocks

At least ext2fs and ufs supports block "fragments" that are smaller
than what is returned in statfs.f_bsize.  That's why I think that
setting statvfs.f_frsize = statfs.f_bsize is misleading, and setting
statvfs.f_frsize = 0 would be better.  On the other hand, I don't
think it is a big problem to lie about statvfs.f_frsize as long as
statvfs.f_bsize is a multiple of statfs.f_bsize.  If we set
statvfs.f_frsize to something different from statfs.f_bsize, we should
also recalculate statvfs.f_blocks.

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]