| 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 | WRITE_LIFE_HINT_NR, |
| 18 | } __packed; |
| 19 | |
| 20 | /* Sparse ignores __packed annotations on enums, hence the #ifndef below. */ |
| 21 | #ifndef __CHECKER__ |
| 22 | static_assert(sizeof(enum rw_hint) == 1); |
| 23 | #endif |
| 24 | |
| 25 | #endif /* _LINUX_RW_HINT_H */ |
| 26 |
