man.bsd.lv manual page server

Manual Page Search Parameters

VOP_FSYNC(9) Kernel Developer's Manual VOP_FSYNC(9)

VOP_FSYNCflush filesystem buffers for a file

#include <sys/param.h>
#include <sys/vnode.h>

int
VOP_FSYNC(struct vnode *vp, int waitfor, int flags);

This call flushes any dirty filesystem buffers for the file. It is used to implement the sync(2) and fsync(2) system calls.

Its arguments are:

vp
the vnode of the file.
waitfor
whether the function should do data, meta-data updates or be full-synchronous.
flags
are additional flags to be passed to the filesystem specific fsync(2) function.

The argument waitfor can use the following flags:

is for an asynchronous data pass and a meta-data pass as well.
means a limited amount of data from dirty buffers and a full meta-data synchronization pass.
will make syncer(4) try to do a full synchronization pass. That is, a meta-data pass and multiple data passes.

The argument flags is to specify additional flags passed to the filesystem specific fsync(2) call. The only supported flag at the moment is VOP_FSYNC_SYSCALL which indicates the file synchronization was requested from userland.

Zero is returned if the call is successful, otherwise an appropriate error code is returned.

[]
The filesystem is full.
[]
Quota exceeded.

syncer(4), vnode(9)

This man page was written by Doug Rabson.

October 8, 2014 DragonFly-5.6.1