Viewing: llapi_fsync.3

.TH LLAPI_FSYNC 3 2025-12-22 "Lustre User API" "Lustre Library Functions"
.SH NAME
llapi_fsync \- flush dirty pages from all Lustre clients
.SH SYNOPSIS
.nf
.B #include <lustre/lustreapi.h>
.sp
.BI "int llapi_fsync(int " fd ");"
.YS
.fi
.SH DESCRIPTION
.B llapi_fsync()
flushes dirty pages from all of the clients for a given file descriptor.
.TP
.I fd
file descriptor
.SH RETURN VALUES
.B llapi_fsync()
returns:
.TP
0
on success
.TP
<0
a negative errno value on failure
.SH EXAMPLES
Flush a file's data across all clients after a parallel IO operation:
.EX
        int fd;
        int rc;
\&
        /* write file concurrently from many clients */
        rc = llapi_fsync(fd);
        if (rc == 0)
                /* success, all client data persistent for this file */
        else
                /* error, some problem was seen during data flush */
.EE
.SH AVAILABILITY
The
.B llapi_fsync
API is part of the
.BR lustre (7)
user application interface library since release 2.16.0.
.\" Added in commit v2_15_91-1-g425b9f75225d
.SH SEE ALSO
.BR llapi_get_data_version (3),
.BR lustre (7),
.BR lustreapi (7)