Page MenuHomeFreeBSD

D19678.id55348.diff
No OneTemporary

D19678.id55348.diff

Index: share/man/man9/Makefile
===================================================================
--- share/man/man9/Makefile
+++ share/man/man9/Makefile
@@ -2233,6 +2233,7 @@
MLINKS+=VOP_CREATE.9 VOP_MKDIR.9 \
VOP_CREATE.9 VOP_MKNOD.9 \
VOP_CREATE.9 VOP_SYMLINK.9
+MLINKS+=VOP_FSYNC.9 VOP_FDATASYNC.9
MLINKS+=VOP_GETPAGES.9 VOP_PUTPAGES.9
MLINKS+=VOP_INACTIVE.9 VOP_RECLAIM.9
MLINKS+=VOP_LOCK.9 vn_lock.9 \
Index: share/man/man9/VOP_FSYNC.9
===================================================================
--- share/man/man9/VOP_FSYNC.9
+++ share/man/man9/VOP_FSYNC.9
@@ -28,19 +28,23 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 24, 1996
+.Dd March 22, 2019
.Dt VOP_FSYNC 9
.Os
.Sh NAME
+.Nm VOP_FDATASYNC ,
.Nm VOP_FSYNC
.Nd flush file system buffers for a file
.Sh SYNOPSIS
.In sys/param.h
.In sys/vnode.h
.Ft int
+.Fn VOP_FDATASYNC "struct vnode *vp" "struct thread *td"
+.Ft int
.Fn VOP_FSYNC "struct vnode *vp" "int waitfor" "struct thread *td"
.Sh DESCRIPTION
-This call flushes any dirty file system buffers for the file.
+.Fn VOP_FSYNC
+flushes any dirty file system buffers for the file.
It is used to implement the
.Xr sync 2
and
@@ -65,6 +69,21 @@
.It Fa td
The calling thread.
.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.
+It has the same arguments as
+.Fn VOP_FSYNC ,
+except for
+.Fa waitfor .
+Instead,
+.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
The file should be locked on entry.
.Sh RETURN VALUES

File Metadata

Mime Type
text/plain
Expires
Fri, May 22, 11:48 AM (7 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33420042
Default Alt Text
D19678.id55348.diff (1 KB)

Event Timeline