Flushes file data from memory to disk.
Item | Description |
---|---|
vp | Points to the virtual node (v-node) of the file. |
flags | Identifies flags from the open file plus flags
that govern the action to be taken. It can be one of the following
values:
|
vinfo | This parameter is currently not used. |
offset | Specifies the starting offset in the file of the data to be flushed. |
length | Specifies the length of the data to be flushed. |
crp | Points to the cred structure. This structure contains data that the file system can use to validate access permission. |
The vnop_fsync entry point is called by the logical file system to request that all modifications associated with a given v-node to be flushed out to permanent storage. This must be done synchronously so that the caller can assure that all I/O has completed successfully. The vnop_fsync_range entry point provides the same function but limits the data to be written to a specified range in the file.
The vnop_fsync and vnop_fsync_range entry points can be called from the process environment only.
Item | Description |
---|---|
0 | Indicates success. |
Nonzero values are returned from the /usr/include/sys/errno.h file to indicate failure.