VFS_SYNC(9)
okay bestie, welcome to VFS_SYNC(9) from the Kernel Developer's Manual β the page that's literally about making sure your file system's unwritten data gets flushed. no cap, this is the group-chat explanation. π
πΈ NAME
VFS_SYNC β flush unwritten data. that's it. that's the whole name. β¨
π¦ 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 unwritten data in the file system mounted as mp. it's giving βclean up your room before guests arriveβ but for kernel I/O. π₯
The arguments it expects are:
mpβ the file system. literally the mount we're talking about. π«Άwaitforβ whether the function should wait for I/O to complete. Possible values are:MNT_WAITβ synchronously wait for I/O to complete.MNT_NOWAITβ start all I/O, but do not wait for it.MNT_LAZYβ push data not written by file system syncer.
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 not out here doing random stuff β it's delegating to the file system's own sync method, iykyk. π
π SEE ALSO
π AUTHORS
This manual page was written by Doug Rabson. iconic behavior, honestly. π
Debian Β· May 23, 2009 Β· VFS_SYNC(9) β that's the source, version, and date sign-off, and we're done. periodt. π
π¦ 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