Contents

VNOP_FSYNC

Call down to a filesystem to synchronize a file with on-disk state.

Declaration

errno_t VNOP_FSYNC(vnode_t vp, int waitfor, vfs_context_t ctx);

Parameters

  • vp:

    The vnode whose data to flush to backing store.

  • ctx:

    Context to authenticate for fsync request.

Return Value

0 for success, else an error code.

Discussion

VNOP_FSYNC is called whenever we need to make sure that a file's data has been pushed to backing store, for example when recycling; it is also the heart of the fsync() system call.

See Also

Support