statvfs · shipping · also fstatvfs

statvfs

statvfs reports mounted-filesystem statistics for a pathname, while fstatvfs queries through an open file descriptor.

Related Observatory article: statvfs on hesela.com

f_bfree counts free blocks and f_bavail those available to unprivileged users; their byte unit is f_frsize. f_ffree and f_favail count inodes separately. Field meanings are not guaranteed for every filesystem. [1]

Linux v6.8 XFS can adjust the results for project quotas when project inheritance, accounting and enforcement apply. Availability is therefore not universally a whole-filesystem count or a per-user quota allowance. [2] [3] The helper prefers a nonzero soft limit over the hard limit and does not consult the grace timer; its count is not a grace-period verdict. [3]

Relations

related
Filesystem quota, Inode, File preallocation, Thin provisioning

Limitations

  • A capacity query does not reserve a file range or establish that a later write will succeed. [1, 4]

Citations

  1. Linux man-pages: statvfs(3), block units and availability counters (accessed 2026-10-21)
  2. Linux v6.8: XFS statfs project-scope selection (accessed 2026-10-21)
  3. Linux v6.8: XFS quota-adjusted filesystem counters (accessed 2026-10-21)
  4. Hesela: filesystem quotas and capacity headroom (accessed 2026-10-21)
Sources & caveats
  • API and implementation source review; no quota-exhaustion experiment. [4]

JSON: /data/terms/statvfs.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. statvfs. Hesela. 2026-10-21. https://hesela.dev/terms/statvfs/