VFS_STATFS(9)
π¦ VFS_STATFS(9) β return file system status π¦
okay so bestie, this page is VFS_STATFS(9), and it lives in the Kernel Developer's Manual β manual name folded in near the top like a little name tag π β and it's literally the macro for returning file system status. no cap, it's giving kernel-dev main character energy π
πΈ NAME πΈ
VFS_STATFS β return file system status
β¨ SYNOPSIS β¨
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/vnode.h>
int
VFS_STATFS(struct mount *mp, struct statfs *sbp);
π DESCRIPTION π
The VFS_STATFS() macro returns various pieces of information about the file system, including recommended I/O sizes, free space, free inodes, etc. it's like the file system's little status drop, and honestly? iconic. π«Ά
The arguments it expects are:
mpβ The file system. yes, the whole file system, not a side quest.sbpβ Astatfsstructure, as defined by<sys/mount.h>, into which information is placed about the file system.
The fields of struct statfs related to the file system are as follows:
f_typeβ Type of file system. that's the field, periodt.f_flagsβ A copy of mount exported flags. copy/paste energy, but make it kernel.f_bsizeβ Fragment size.f_iosizeβ Optimal transfer block size.f_blocksβ The total number of data blocks in the file system.f_bfreeβ The number of free blocks in the file system.f_bavailβ The number of free blocks available to non-superuser processes. not the superuser VIP section.f_filesβ The total number of file nodes in the file system.f_ffreeβ The number of free nodes available to non-superuser processes.f_syncwritesβ The number of synchronous writes since the file system was mounted.f_asyncwritesβ The number of asynchronous writes since the file system was mounted.f_syncreadsβ The number of synchronous reads since the file system was mounted.f_asyncreadsβ The number of asynchronous reads since the file system was mounted.f_namemaxβ The maximum file name length for this file system.f_ownerβ The user ID of the user that mounted the file system.f_fsidβ Unique file system ID.f_fstypenameβ The file system type name; a string of at mostMFSNAMELENbytes.f_mntfromnameβ The device name the file system was mounted from; a string of at mostMNAMELENbytes.f_mntonnameβ The name of the directory on which the file system is mounted; a string of at mostMNAMELENbytes.
π«Ά SEE ALSO π«Ά
π AUTHORS π
This manual page was written by Doug Rabson. ty Doug, you ate π
source/version: Debian Β· date: May 23, 2009 Β· page: VFS_STATFS(9) β byeee, bestie π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 1996 Doug Rabson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms