Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fdatasync(2) [netbsd man page]

FDATASYNC(2)						      BSD System Calls Manual						      FDATASYNC(2)

NAME
fdatasync -- synchronize the data of a file LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> int fdatasync(int fd); DESCRIPTION
The 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 synchronized I/O data integrity completion. RETURN VALUES
A value of 0 is returned on success. Otherwise, a value -1 is returned and errno is set to indicate the error. ERRORS
The fdatasync() function will fail if: [EBADF] The fd argument is not a valid file descriptor open for writing. [EINVAL] This implementation does not support synchronized I/O for this file. [ENOSYS] The 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. SEE ALSO
fsync(2), open(2), read(2), write(2) STANDARDS
The fdatasync() function conforms to IEEE Std 1003.1b-1993 (``POSIX.1''). BSD
October 25, 2003 BSD

Check Out this Related 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)
Man Page

8 More Discussions You Might Find Interesting

1. Programming

Fail tail algorithm

I am currently working on code that simulates a file tail algorithm since the only way to retrieve the required information is from within a file, and this information needs to be retrieved in as close to real time as possible when the event enters the file. I cannot use system("tail <options>")... (6 Replies)
Discussion started by: foureightyeast
6 Replies

2. Programming

serializing logging output mult. proc. inst deamon

Hello, i have an interresting topic today C++ on solaris. lgpl stuff applicable. My program is a deamon process wich takes input from network, then processes the data, and outputs reformatted to network. We're generating a lot of logging output. the logging is absolutely unbuffered at the... (3 Replies)
Discussion started by: heck
3 Replies

3. Solaris

Apache config issue

I want to build a little website on a Sun Blade 100 running Solaris 10. I just went out to apache.org and downloaded Unix Source: httpd-2.2.8.tar.gz After unpacking the tarball, I CD'd into the subdirectory and ran the configure utility. Of course, it crapped out. I see that it is... (17 Replies)
Discussion started by: BrewDudeBob
17 Replies

4. Filesystems, Disks and Memory

How To setup a Diskless Swap System.

This is a guide for setting up your computer with a fast swap system using usb memory sticks. A detailed study of the theories behind this setup can be found here. While this How-To does not include the CFLRU replacement algorithm, it does show the performance benefits of using NAND flash memory... (2 Replies)
Discussion started by: Johnny_Thumbs
2 Replies

5. Shell Programming and Scripting

problem using awk

Hi there every body I'm new to shell scripting and there is a problem facing me,, please look at the following piece of code: awk ' BEGIN{ FS="<assertion id=\1"; RS="<assertion id=\"2"}/<assertion id=\"1/{print FS$2 > "/home/ds2/test/output.txt"} ' filename all I wanna do is to... (6 Replies)
Discussion started by: senior_ahmed
6 Replies

6. Programming

Understanding read/write and kernel interaction

Ok, so I'm trying to finalize my understanding of read/write and kernel interaction. read(): You have a library function that has as it's first parameter (what the open file to read from is), second parameter( a pointer to a buffer (is this the location of a buffer in the user area or the... (7 Replies)
Discussion started by: Krothos
7 Replies

7. Filesystems, Disks and Memory

ext4 - ready for production system?

Gidday, Are you using ext4 for production system? Or is it better to opt for a more conservative strategy, like ext3 for instance? What are your experiences? Thanks in advance, Loïc. (3 Replies)
Discussion started by: Loic Domaigne
3 Replies

8. UNIX for Advanced & Expert Users

split command

./myapp | split -b 10m -d -a 1 - "myappLog" here split command is reading the input from the output of myapp and it will write the text in to file where in each file size is 10MB and it will create upto 10 files. I have observed split is flushing the data for every 4096 bytes. if my... (7 Replies)
Discussion started by: arv600
7 Replies