Releases portions of a file.
Item | Description |
---|---|
vp | Points to the virtual node (v-node) of the file. |
flags | Identifies the flags from the open file structure. |
offset | Indicates where to start clearing in the file. |
len | Specifies the length of the area to be cleared. |
vinfo | This parameter is unused. |
crp | Points to the cred structure. This structure contains data that the file system can use to validate access permission. |
The vnop_fclear entry point is called from the logical file system to clear bytes in a file, returning whole free blocks to the underlying file system. This entry point performs the clear regardless of whether the file is mapped.
Upon completion of the vnop_fclear entry point, the logical file system updates the file offset to reflect the number of bytes cleared. Also upon completion, if either the starting or ending offset is past the starting end of file, the file is extended.
The vnop_fclear entry point can be called from the process environment only.
Item | Description |
---|---|
0 | Indicates success. |
Nonzero return values are returned from the /usr/include/sys/errno.h file to indicate failure.