VFS_STATFS(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ¦‹ 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 β€” A statfs structure, 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 most MFSNAMELEN bytes.
  • f_mntfromname β€” The device name the file system was mounted from; a string of at most MNAMELEN bytes.
  • f_mntonname β€” The name of the directory on which the file system is mounted; a string of at most MNAMELEN bytes.

🫢 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