xref: /illumos-gate/usr/src/uts/common/sys/fdsync.h (revision c1a180511b31c8284f28e3c3a69ed55e290930e2)
1 /*
2  * This file and its contents are supplied under the terms of the
3  * Common Development and Distribution License ("CDDL"), version 1.0.
4  * You may only use this file in accordance with the terms of version
5  * 1.0 of the CDDL.
6  *
7  * A full copy of the text of the CDDL should have accompanied this
8  * source.  A copy of the CDDL is also available via the Internet at
9  * http://www.illumos.org/license/CDDL.
10  */
11 
12 /*
13  * Copyright 2024 Oxide Computer Company
14  */
15 
16 #ifndef _SYS_FDSYNC_H
17 #define	_SYS_FDSYNC_H
18 
19 /*
20  * This is a private header that shouldn't be shipped which covers specifics of
21  * the fdsync system call (which is not a public libc interface).
22  */
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 typedef enum {
29 	/*
30 	 * Sync the file system indicated by the file descriptor. This is
31 	 * syncfs(3C).
32 	 */
33 	FDSYNC_FS	= 1,
34 	/*
35 	 * Sync all data and metadata that is outstanding on the file
36 	 * descriptor. This is fsync(3C).
37 	 */
38 	FDSYNC_FILE,
39 	/*
40 	 * Sync only the data that is outstanding on the file descriptor. This
41 	 * is fdatasync(3C).
42 	 */
43 	FDSYNC_DATA
44 } fdsync_mode_t;
45 
46 #ifdef __cplusplus
47 }
48 #endif
49 
50 #endif /* _SYS_FDSYNC_H */
51