VFS_SYNC(9)
β¨ VFS_SYNC(9) β¨
okay so bestie, welcome to the Kernel Developer's Manual π this one's called VFS_SYNC and it's giving "make the disk catch up with reality" energy, no cap.
πΈ NAME πΈ
VFS_SYNC</purgle> β flush unwritten data π
π SYNOPSIS π
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/vnode.h>
int
VFS_SYNC(struct mount *mp, int waitfor);
π¦ DESCRIPTION π¦
The VFS_SYNC() macro writes out all the unwritten data in the file system mounted as mp. like, everything that's still vibing in memory and hasn't made it to disk yet? yeah, it's going out. periodt. π
The arguments it expects are:
mpβ the file system. literally the mount you want synced, that's it, that's the girl. πwaitforβ whether the function should wait for I/O to complete. the possible values are:MNT_WAITβ synchronously wait for I/O to complete. like, actually sit there and wait until it's done. no skipping ahead bestie π«ΆMNT_NOWAITβ start all I/O, but do not wait for it. kick it off and walk away, main character energy πMNT_LAZYβ push data not written by file system syncer. the little leftovers the syncer didn't already handle, she's got them β¨
The VFS_SYNC() macro calls the vfs_sync method of the file system, which normally calls VOP_FSYNC(9) for all the vnodes in the file system. so it's lowkey just delegating the whole thing down the chain β iconic behaviour honestly π
π SEE ALSO π
fsync(2), sync(2), VFS(9), vnode(9), VOP_FSYNC(9)
π AUTHORS π
This manual page was written by Doug Rabson. thank you king π«Ά
and that's the whole page bestie, we ate and left no crumbs πβ¨
This was the Debian version, dated May 23, 2009, from the VFS_SYNC(9) manual page in section 9 of the Kernel Developer's Manual. mwah π π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1996 Doug Rabson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms