1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_RW_HINT_H
3 #define _LINUX_RW_HINT_H
4 
5 #include <linux/build_bug.h>
6 #include <linux/compiler_attributes.h>
7 #include <uapi/linux/fcntl.h>
8 
9 /* Block storage write lifetime hint values. */
10 enum rw_hint {
11 	WRITE_LIFE_NOT_SET	= RWH_WRITE_LIFE_NOT_SET,
12 	WRITE_LIFE_NONE		= RWH_WRITE_LIFE_NONE,
13 	WRITE_LIFE_SHORT	= RWH_WRITE_LIFE_SHORT,
14 	WRITE_LIFE_MEDIUM	= RWH_WRITE_LIFE_MEDIUM,
15 	WRITE_LIFE_LONG		= RWH_WRITE_LIFE_LONG,
16 	WRITE_LIFE_EXTREME	= RWH_WRITE_LIFE_EXTREME,
17 } __packed;
18 
19 /* Sparse ignores __packed annotations on enums, hence the #ifndef below. */
20 #ifndef __CHECKER__
21 static_assert(sizeof(enum rw_hint) == 1);
22 #endif
23 
24 #endif /* _LINUX_RW_HINT_H */
25