Flushes information in memory and data to disk.
int vn_fsync (vp, flags, crp) struct vnode *vp; int flags; struct ucred *crp;
vp | Points to the virtual node (v-node) of the file. |
flags | Identifies flags from the open file. |
crp | Points to the cred structure. This structure contains data that the file system can use to validate access permission. |
The vn_fsync entry point is called by the logical file system to request that all modifications associated with a given v-node be flushed out to permanent storage. This must be synchronously so that the caller can be assured that all I/O has completed successfully.
The vn_fsync entry point can be called from the process environment only.
0 | Indicates success. |
Nonzero values are returned from the /usr/include/sys/errno.h file to indicate failure.
The fsync subroutine.
Virtual File System Overview, Virtual File System Kernel Extensions Overview, Logical File System Overview, Understanding Virtual Nodes (V-nodes) in AIX Kernel Extensions and Device Support Programming Concepts.