1AIO_FSYNC(3)               Linux Programmer's Manual              AIO_FSYNC(3)
2
3
4

NAME

6       aio_fsync - asynchronous file synchronization
7

SYNOPSIS

9       #include <aio.h>
10
11       int aio_fsync(int op, struct aiocb *aiocbp);
12
13       Link with -lrt.
14

DESCRIPTION

16       The  aio_fsync()  function  does a sync on all outstanding asynchronous
17       I/O operations associated with aiocbp->aio_fildes.
18
19       More precisely, if op is O_SYNC, then all currently queued  I/O  opera‐
20       tions  shall  be  completed  as  if by a call of fsync(2), and if op is
21       O_DSYNC, this call is the asynchronous analog  of  fdatasync(2).   Note
22       that  this  is a request only — this call does not wait for I/O comple‐
23       tion.
24
25       Apart from aio_fildes the only field in the  structure  pointed  to  by
26       aiocbp  that  is  used by this call is the aio_sigevent field (a struct
27       sigevent) that indicates the desired type of asynchronous  notification
28       at completion.  All other fields are ignored.
29

RETURN VALUE

31       On  success  (the  sync  request was successfully queued) this function
32       returns 0.  On error -1 is returned, and errno is set appropriately.
33

ERRORS

35       EAGAIN Out of resources.
36
37       EBADF  aio_fildes is not a valid file descriptor open for writing.
38
39       EINVAL No synchronized I/O for this file is supported,  or  op  is  not
40              O_SYNC or O_DSYNC.
41

CONFORMING TO

43       POSIX.1-2001.
44

SEE ALSO

46       aio_cancel(3),   aio_error(3),   aio_read(3),  aio_return(3),  aio_sus‐
47       pend(3), aio_write(3)
48

COLOPHON

50       This page is part of release 3.25 of the Linux  man-pages  project.   A
51       description  of  the project, and information about reporting bugs, can
52       be found at http://www.kernel.org/doc/man-pages/.
53
54
55
56                                  2003-11-14                      AIO_FSYNC(3)
Impressum