statvfs
statvfs reports mounted-filesystem statistics for a pathname, while fstatvfs queries through an open file descriptor.
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
Limitations
Citations
- Linux man-pages: statvfs(3), block units and availability counters
- Linux v6.8: XFS statfs project-scope selection
- Linux v6.8: XFS quota-adjusted filesystem counters
- Hesela: filesystem quotas and capacity headroom
Sources & caveats
- API and implementation source review; no quota-exhaustion experiment. [4]