System V statfs structure element semantics

Kenneth Almquist ka at june.cs.washington.edu
Fri Sep 30 08:01:43 AEST 1988


dce at mips.COM (David Elliott) asks:
> Our system is based on SVR3, but has a BSD-based filesystem.
> Currently, if you run statfs() on an empty filesystem, f_blocks gives
> you the total number of blocks in the system, and f_bfree gives you the
> same number minus the "minfree" space (usually 10%).  This means that
> if you do your math based on these numbers, an empty filesystem will
> appear to be 10% full.
> 
> Are our values correct? What does the standard System V statfs do?
> Does System V have a notion of space that only the superuser can fill?

System V does not have any notion of space that only the superuser can
fill, but it does have space that cannot be used to store file data:  the
superblock, the inode space, and one unused block between the superblock
and the inode space.  (This unused block was introduced during the
conversion from the 512 byte file system to the 1024 byte file system,
apparently unintentionally.)  I believe that these are included in the
"total number of blocks" in the file system.  If so, there is no file
system independent way to calculate the percentage of free space in a
file system under System V.
					Kenneth Almquist



More information about the Comp.unix.wizards mailing list