fdatasync man page on CentOS

Man page or keyword search:  
man Server   8420 pages
apropos Keyword Search (all sections)
Output format
CentOS logo
[printable version]

FDATASYNC(2)		   Linux Programmer's Manual		  FDATASYNC(2)

NAME
       fdatasync - synchronize a file's in-core data with that on disk

SYNOPSIS
       #include <unistd.h>

       int fdatasync(int fd);

DESCRIPTION
       fdatasync() flushes all data buffers of a file to disk (before the sys‐
       tem call returns).  It resembles fsync() but is not required to	update
       the metadata such as access time.

       Applications that access databases or log files often write a tiny data
       fragment (e.g., one line in a log file) and then call  fsync()  immedi‐
       ately  in order to ensure that the written data is physically stored on
       the harddisk. Unfortunately, fsync() will  always  initiate  two	 write
       operations:  one for the newly written data and another one in order to
       update the modification time stored in the inode. If  the  modification
       time  is	 not a part of the transaction concept fdatasync() can be used
       to avoid unnecessary inode disk write operations.

RETURN VALUE
       On success, zero is returned.  On error, -1 is returned, and  errno  is
       set appropriately.

ERRORS
       EBADF  fd is not a valid file descriptor open for writing.

       EIO    An error occurred during synchronization.

       EROFS, EINVAL
	      fd  is  bound  to a special file which does not support synchro‐
	      nization.

BUGS
       Currently (Linux 2.2) fdatasync() is equivalent to fsync().

AVAILABILITY
       On POSIX systems on which  fdatasync()  is  available,  _POSIX_SYNCHRO‐
       NIZED_IO	 is defined in <unistd.h> to a value greater than 0. (See also
       sysconf(3).)

CONFORMING TO
       POSIX.1-2001.

SEE ALSO
       fsync(2) sync_file_range(2),
       B.O. Gallmeister, POSIX.4, O'Reilly, pp. 220-223 and 343.

Linux 1.3.86			  1996-04-13			  FDATASYNC(2)
[top]

List of man pages available for CentOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net