Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fdatasync(2) [osf1 man page]

fdatasync(2)							System Calls Manual						      fdatasync(2)

NAME
fdatasync - Writes data changes in a file to permanent storage SYNOPSIS
#include <unistd.h> int fdatasync ( int fildes ); PARAMETERS
Specifies a valid open file descriptor. DESCRIPTION
The fdatasync function causes system buffers containing a file's modified data to be written to permanent storage. The fdatasync function does not return until the operation has been completed. The fdatasync function provides data integrity, ensuring that data in permanent storage is identical to data in the buffer. However, use of fdatasync does not guarantee that file control information such as owner and modification time has been updated to permanent storage (see the fsync function). NOTES
The file identified by the fildes parameter must be open for writing when the fdatasync function is issued or the call will fail. RETURN VALUES
Upon successful completion, the fdatasync function returns a value of 0 (zero). If the fdatasync function fails, a value of -1 is returned and errno is set to indicate the error. If fdatasync fails, outstanding I/O operations are not guaranteed to have been completed. ERRORS
If the fdatasync function fails, errno may be set to one of the following values: [EBADF] The fildes parameter is not a valid file descriptor. [EINVAL] The fildes parameter does not refer to a file on which this operation is possible. If any queued I/O operations fail, the fdatasync function returns error conditions defined for the read and write functions. RELATED INFORMATION
Functions: fcntl(2), fsync(2), open(2), read(2), sync(2), write(2) delim off fdatasync(2)

Check Out this Related Man Page

fdatasync(3C)						   Standard C Library Functions 					     fdatasync(3C)

NAME
fdatasync - synchronize a file's data SYNOPSIS
#include <unistd.h> int fdatasync(int fildes); DESCRIPTION
The fdatasync() function forces all currently queued I/O operations associated with the file indicated by file descriptor fildes to the synchronized I/O completion state. The functionality is as described for fsync(3C) (with the symbol _XOPEN_REALTIME defined), with the exception that all I/O operations are completed as defined for synchronised I/O data integrity completion. RETURN VALUES
If successful, the fdatasync() function returns 0. Otherwise, the function returns -1 and sets errno to indicate the error. If the fdata- sync() function fails, outstanding I/O operations are not guaranteed to have been completed. ERRORS
The fdatasync() function will fail if: EBADF The fildes argument is not a valid file descriptor open for writing. EINVAL The system does not support synchronized I/O for this file. ENOSYS The function fdatasync() is not supported by the system. In the event that any of the queued I/O operations fail, fdatasync() returns the error conditions defined for read(2) and write(2). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |Async-Signal-Safe | +-----------------------------+-----------------------------+ |Standard |See standards(5). | +-----------------------------+-----------------------------+ SEE ALSO
fcntl(2), open(2), read(2), write(2), fsync(3C), aio_fsync(3C), fcntl.h(3HEAD), attributes(5), standards(5) SunOS 5.11 5 Feb 2008 fdatasync(3C)
Man Page