FDATASYNC(2) | System Calls Manual | FDATASYNC(2) |
fdatasync
—
#include <unistd.h>
int
fdatasync
(int
fd);
fdatasync
() function forces all modified data
associated with the file descriptor fd to be flushed to
stable storage.
The functionality is as described for fsync(2), with the exception that file status information need not be synchronized, which may result in a performance gain, compared to fsync(2). This behaviour is commonly known as
fdatasync
() function will fail if:
EBADF
]EINVAL
]ENOSYS
]fdatasync
() function is not supported by this
implementation.In the event that any of the I/O operations to be performed fail,
fdatasync
() returns the error conditions defined for
read(2) and
write(2), and outstanding I/O
operations are not guaranteed to have been completed.
fdatasync
() function conforms to
IEEE Std 1003.1b-1993 (“POSIX.1b”).
October 25, 2003 | NetBSD 9.0 |