Path: utzoo!attcan!uunet!munnari!bruce!labtam!sp From: sp@labtam.OZ (Stephen Prince) Newsgroups: comp.unix.wizards Subject: Re: System V statfs structure element semantics Message-ID: <1015@labtam.OZ> Date: 30 Sep 88 05:20:22 GMT References: <3826@dunkshot.mips.COM> Reply-To: sp@labtam.OZ Organization: Labtam Limited., Melbourne, Australia Lines: 46 In article <3826@dunkshot.mips.COM>, dce@mips.COM (David Elliott) writes: > 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. But this "minfree" limit only applies to non-super-users. Do you report something different for super-user? > Are our values correct? Would like to know the answer to that also. Having just been through the exercise of porting the 4.3BSD file system to SVR3. > What does the standard System V statfs do? I'm not sure what you call standard, the 3 vols of SVID I have here, don't have anything to say on this system call. While the SVR3 Programmer's Reference Manual only makes reference in describing the returned structure: long f_blocks; /* Total number of blocks */ long f_bfree; /* Count of free blocks */ and looking at the source (fs/s5/s5sys3.c): f_blocks = the superblock field which gives the size in blocks of the _entire_ volume (s_fsize) f_bfree = superblock field which gives the _total_ free blocks (s_tfree). Since this point was not clarified, I decided to take the approach used by the bsd version of df(1): f_blocks = # of data blocks in file system (fs_dsize) f_bfree = (# of free blocks) * (# frag/block) + (# free frag) of course the two values are converted to a 512 byte block size before returning. > Does System V have a notion of space that only the superuser can fill? Not in our SysV version from N.S. (Genix). /sp