Flushes file data to disk.
|vp||Points to the vnode.|
|flags||Specifies the File flags.|
|fd||Specifies the File descriptor.|
|length||Specifies the length of the flush request.|
|crp||Specifies user's credentials.|
The vn_fsync_range entry point is used to flush file data and meta-data to disk. The offset and length parameters define the range that needs to be flushed. If length is given as zero, then the entire file past offset should be flushed.
The flags parameter controls how the flushing should be done. If the O_SYNC flag is set, then the flush should be done according to the synchronized file I/O integrity completion rules. If O_DSYNC is set, then the flush should be done according to the synchronized data I/O integrity completion rules.
File systems that do not define GFS_VERSION421 in their gfs flags do not need to supply a vn_fsync_range entry point. The logical file system will funnel all fsync requests through the old vn_fsync entry point.
The vn_fsync_range entry points can be called from the process environment only.
|Zero||Indicates a successful operation.|
|Nonzero||Indicates that the operation failed; return values should be chosen from the /usr/include/sys/errno.h file.|
The fsync, fdatasync, fsync_range subroutines.
Virtual File System Overview, Logical File System Overview, Understanding Virtual Nodes (V-nodes), and Virtual File System Kernel Extensions Overview.
List of Virtual File System Operations.