| zfs_statfs(vfs_t *vfsp, struct statfs *statp)
|
| {
|
| ...
|
| /*
|
| * statvfs() should really be called statufs(), because it assumes
|
| * static metadata. ZFS doesn't preallocate files, so the best
|
| * we can do is report the max that could possibly fit in f_files,
|
| * and that minus the number actually used in f_ffree.
|
| * For f_ffree, report the smaller of the number of object available
|
| * and the number of blocks (each object will take at least a block).
|
| */
|
| statp->f_ffree = MIN(availobjs, statp->f_bfree);
|
| statp->f_files = statp->f_ffree + usedobjs;
|