{
  "slug": "statvfs",
  "term": "statvfs",
  "aliases": [
    "fstatvfs"
  ],
  "definition": "statvfs reports mounted-filesystem statistics for a pathname, while fstatvfs queries through an open file descriptor.",
  "note": "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. [statvfs]\n\nLinux 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. [xfs-statfs] [xfs-quota-counters] 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. [xfs-quota-counters]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "A capacity query does not reserve a file range or establish that a later write will succeed.",
      "citationIds": [
        "statvfs",
        "hesela-capacity"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-21",
  "related": [
    "filesystem-quota",
    "inode",
    "file-preallocation",
    "thin-provisioning"
  ],
  "provenance": [
    "API and implementation source review; no quota-exhaustion experiment. [hesela-capacity]"
  ],
  "citations": [
    {
      "id": "statvfs",
      "title": "Linux man-pages: statvfs(3), block units and availability counters",
      "url": "https://man7.org/linux/man-pages/man3/statvfs.3.html",
      "accessed": "2026-10-21"
    },
    {
      "id": "xfs-statfs",
      "title": "Linux v6.8: XFS statfs project-scope selection",
      "url": "https://github.com/torvalds/linux/blob/v6.8/fs/xfs/xfs_super.c#L770-L839",
      "accessed": "2026-10-21"
    },
    {
      "id": "xfs-quota-counters",
      "title": "Linux v6.8: XFS quota-adjusted filesystem counters",
      "url": "https://github.com/torvalds/linux/blob/v6.8/fs/xfs/xfs_qm_bhv.c#L18-L62",
      "accessed": "2026-10-21"
    },
    {
      "id": "hesela-capacity",
      "title": "Hesela: filesystem quotas and capacity headroom",
      "url": "https://hesela.com/analyses/sparse-files-preallocation-thin-capacity/#quota-headroom",
      "accessed": "2026-10-21"
    }
  ]
}
