Skip to content

doc: clarify fs.StatFs field descriptions#62242

Open
kovan wants to merge 1 commit intonodejs:mainfrom
kovan:doc/statfs-documentation
Open

doc: clarify fs.StatFs field descriptions#62242
kovan wants to merge 1 commit intonodejs:mainfrom
kovan:doc/statfs-documentation

Conversation

@kovan
Copy link
Contributor

@kovan kovan commented Mar 13, 2026

Clarify the fs.StatFs field descriptions:

  • bsize: specify that the value is in bytes and serves as the unit for block count fields
  • blocks, bfree, bavail: add "multiply by bsize" guidance so users can compute sizes; clarify the difference between bfree (includes superuser-reserved blocks) and bavail (unprivileged)
  • type: explain that this is a file system magic number with common examples and a pointer to platform-specific man pages
  • files, ffree: note that these count inodes

Picks up the work from #51301, #55279, and #59626 which all attempted to address this issue but stalled.

Fixes: #50749

Clarify that bsize is in bytes and serves as the unit for the block
count fields (blocks, bfree, bavail). Add "multiply by bsize" hints
so users can compute sizes without guessing units. Explain that type
is a file system magic number with platform-specific values. Mention
that ffree/files count inodes.

Fixes: nodejs#50749
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. labels Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing documentation in fs.StatFs

2 participants