Morning,
during a recent discussion it was found that statfs returns "0" for fs without
inodes.
According to man statfs:
Fields that are undefined for a particular file system are set to -1.
fstatfs returns the same information about an open file referenced by
descriptor fd.
However:
# find . -name '*.c' -type f| xargs grep tmp.f_ffree
./fs/adfs/super.c: tmp.f_ffree = tmp.f_bfree >> nidlen;
./fs/affs/super.c: tmp.f_ffree = 0;
./fs/autofs/inode.c: tmp.f_ffree = 0;
./fs/coda/inode.c: tmp.f_ffree = 9000000;
./fs/devpts/inode.c: tmp.f_ffree = 0;
./fs/ext2/super.c: tmp.f_ffree = ext2_count_free_inodes (sb);
./fs/fat/inode.c: tmp.f_ffree = 0;
./fs/hfs/super.c: tmp.f_ffree = mdb->free_ablocks;
./fs/hpfs/hpfs_fs.c: tmp.f_ffree = s->s_hpfs_n_free_dnodes;
./fs/isofs/inode.c: tmp.f_ffree = 0;
./fs/minix/inode.c: tmp.f_ffree = minix_count_free_inodes(sb);
./fs/ncpfs/inode.c: tmp.f_ffree = -1;
./fs/nfs/inode.c: tmp.f_ffree = 0;
./fs/proc/inode.c: tmp.f_ffree = 0;
./fs/qnx4/inode.c: tmp.f_ffree = qnx4_count_free_inodes(sb);
./fs/sysv/inode.c: tmp.f_ffree = sysv_count_free_inodes(sb); /*
free
file nodes in fs */
./fs/ufs/super.c: tmp.f_ffree = SWAB32(usb1->fs_cstotal.cs_nifree);
All those where it is set to 0 (or even coda, to 900000) appear wrong.
f_files appears to be an equally buggy field, maybe some others.
Sincerely,
Lars Marowsky-Brée
-- Lars Marowsky-Brée Network Managementteuto.net Netzdienste GmbH
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:19 EST