To get the changes in the commit c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints"). Silencing this perf build warning: Warning: include/uapi/linux/fcntl.h differs from kernel We already beautify the fcntl cmd argument, so an upcoming cset will update the 'cmd' strarray to cover these new commands. The hints are in the 3rd arg, a pointer, so not yet supported in 'perf trace', for that we need to copy it somehow, probably using eBPF, a new attempt at doing that is planned.
Showing the changes to tools/include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -42,6 +42,27 @@ · 41 unmodified lines | ||
| 42 | 42 | #define F_SEAL_WRITE 0x0008 /* prevent writes */ |
| 43 | 43 | /* (1U << 31) is reserved for signed error codes */ |
| 44 | 44 | |
| 45 | +/* | |
| 46 | + * Set/Get write life time hints. {GET,SET}_RW_HINT operate on the | |
| 47 | + * underlying inode, while {GET,SET}_FILE_RW_HINT operate only on | |
| 48 | + * the specific file. | |
| 49 | + */ | |
| 50 | +#define F_GET_RW_HINT (F_LINUX_SPECIFIC_BASE + 11) | |
| 51 | +#define F_SET_RW_HINT (F_LINUX_SPECIFIC_BASE + 12) | |
| 52 | +#define F_GET_FILE_RW_HINT (F_LINUX_SPECIFIC_BASE + 13) | |
| 53 | +#define F_SET_FILE_RW_HINT (F_LINUX_SPECIFIC_BASE + 14) | |
| 54 | + | |
| 55 | +/* | |
| 56 | + * Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be | |
| 57 | + * used to clear any hints previously set. | |
| 58 | + */ | |
| 59 | +#define RWF_WRITE_LIFE_NOT_SET 0 | |
| 60 | +#define RWH_WRITE_LIFE_NONE 1 | |
| 61 | +#define RWH_WRITE_LIFE_SHORT 2 | |
| 62 | +#define RWH_WRITE_LIFE_MEDIUM 3 | |
| 63 | +#define RWH_WRITE_LIFE_LONG 4 | |
| 64 | +#define RWH_WRITE_LIFE_EXTREME 5 | |
| 65 | + | |
| 45 | 66 | /* |
| 46 | 67 | * Types of directory notifications that may be requested. |
| 47 | 68 | */ |