Subject: Re: Supporting sector size != DEV_BSIZE
To: Ben Harris <bjh21@netbsd.org>
From: Robert Elz <kre@munnari.OZ.AU>
List: tech-kern
Date: 06/12/2002 21:11:35
    Date:        Mon, 10 Jun 2002 19:09:05 +0100
    From:        Ben Harris <bjh21@netbsd.org>
    Message-ID:  <E17HTbF-0007bj-00@chiark.greenend.org.uk>

  | I think that .1-2001/Cor1-2002 is meant to introduce some informative text
  | explaining that the block size of st_blocks is unrelated to any other "block
  | size" in the standard, and may not even be constant across an implementation

That would be a horrible thing to do.   The value isn't useful unless its
value can be interpreted.   If you can't find a way to specify exactly what
it means, better to delete it completely, and allow implementations to
simply add it in as a local extra.

  | The field is pretty
  | close to meaningless in current POSIX -- suggestions on how it should be
  | specified are probably welcome.

Simply specify the units in which it must be counted (and make that be 512
bytes...) and that it counts file system space actually consumed by the
file (so adding the st_blocks fields for all files on a filesystem,
directories included, will show the total allocated data space on the
filesystem - exactly - just inodes, super blocks, and stuff to add to
get complete space currently used).

kre