Add man page for VOP_FDATASYNC(9)
Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19678
This commit is contained in:
parent
8ba190efeb
commit
f6a363a50d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/fuse2/; revision=345421
@ -2233,6 +2233,7 @@ MLINKS+=VOP_ATTRIB.9 VOP_GETATTR.9 \
|
|||||||
MLINKS+=VOP_CREATE.9 VOP_MKDIR.9 \
|
MLINKS+=VOP_CREATE.9 VOP_MKDIR.9 \
|
||||||
VOP_CREATE.9 VOP_MKNOD.9 \
|
VOP_CREATE.9 VOP_MKNOD.9 \
|
||||||
VOP_CREATE.9 VOP_SYMLINK.9
|
VOP_CREATE.9 VOP_SYMLINK.9
|
||||||
|
MLINKS+=VOP_FSYNC.9 VOP_FDATASYNC.9
|
||||||
MLINKS+=VOP_GETPAGES.9 VOP_PUTPAGES.9
|
MLINKS+=VOP_GETPAGES.9 VOP_PUTPAGES.9
|
||||||
MLINKS+=VOP_INACTIVE.9 VOP_RECLAIM.9
|
MLINKS+=VOP_INACTIVE.9 VOP_RECLAIM.9
|
||||||
MLINKS+=VOP_LOCK.9 vn_lock.9 \
|
MLINKS+=VOP_LOCK.9 vn_lock.9 \
|
||||||
|
@ -28,20 +28,27 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd July 24, 1996
|
.Dd March 22, 2019
|
||||||
.Dt VOP_FSYNC 9
|
.Dt VOP_FSYNC 9
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
.Nm VOP_FDATASYNC ,
|
||||||
.Nm VOP_FSYNC
|
.Nm VOP_FSYNC
|
||||||
.Nd flush file system buffers for a file
|
.Nd flush file system buffers for a file
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.In sys/param.h
|
.In sys/param.h
|
||||||
.In sys/vnode.h
|
.In sys/vnode.h
|
||||||
.Ft int
|
.Ft int
|
||||||
|
.Fn VOP_FDATASYNC "struct vnode *vp" "struct thread *td"
|
||||||
|
.Ft int
|
||||||
.Fn VOP_FSYNC "struct vnode *vp" "int waitfor" "struct thread *td"
|
.Fn VOP_FSYNC "struct vnode *vp" "int waitfor" "struct thread *td"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
This call flushes any dirty file system buffers for the file.
|
.Fn VOP_FSYNC
|
||||||
It is used to implement the
|
ensures that a file can be recovered to its current state following a crash.
|
||||||
|
That typically requires flushing the file's dirty buffers, its inode, and
|
||||||
|
possibly other filesystem metadata to persistent media.
|
||||||
|
.Fn VOP_FSYNC
|
||||||
|
is used to implement the
|
||||||
.Xr sync 2
|
.Xr sync 2
|
||||||
and
|
and
|
||||||
.Xr fsync 2
|
.Xr fsync 2
|
||||||
@ -65,8 +72,20 @@ Push data not written by file system syncer.
|
|||||||
.It Fa td
|
.It Fa td
|
||||||
The calling thread.
|
The calling thread.
|
||||||
.El
|
.El
|
||||||
|
.Pp
|
||||||
|
.Fn VOP_FDATASYNC
|
||||||
|
is similar, but it does not require that all of the file's metadata be flushed.
|
||||||
|
It only requires that the file's data be recoverable after a crash.
|
||||||
|
That implies that the data itself must be flushed to disk, as well as some
|
||||||
|
metadata such as the file's size but not necessarily its attributes.
|
||||||
|
.Fn VOP_FDATASYNC
|
||||||
|
should always wait for I/O to complete, as if called with
|
||||||
|
.Dv MNT_WAIT .
|
||||||
|
.Fn VOP_FDATASYNC
|
||||||
|
is used to implement
|
||||||
|
.Xr fdatasync 2 .
|
||||||
.Sh LOCKS
|
.Sh LOCKS
|
||||||
The file should be locked on entry.
|
The vnode should be exclusively locked on entry, and stays locked on return.
|
||||||
.Sh RETURN VALUES
|
.Sh RETURN VALUES
|
||||||
Zero is returned if the call is successful, otherwise an appropriate
|
Zero is returned if the call is successful, otherwise an appropriate
|
||||||
error code is returned.
|
error code is returned.
|
||||||
|
Loading…
Reference in New Issue
Block a user