mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 05:42:46 +01:00
Add WRITE_LIFE_HINT_NR into the rw_hint enum to define the number of values write life time hints can be set to. This is useful for e.g. file systems which may want to map these values to allocation groups. Signed-off-by: Hans Holmberg <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Carlos Maiolino <[email protected]>
26 lines
723 B
C
26 lines
723 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_RW_HINT_H
|
|
#define _LINUX_RW_HINT_H
|
|
|
|
#include <linux/build_bug.h>
|
|
#include <linux/compiler_attributes.h>
|
|
#include <uapi/linux/fcntl.h>
|
|
|
|
/* Block storage write lifetime hint values. */
|
|
enum rw_hint {
|
|
WRITE_LIFE_NOT_SET = RWH_WRITE_LIFE_NOT_SET,
|
|
WRITE_LIFE_NONE = RWH_WRITE_LIFE_NONE,
|
|
WRITE_LIFE_SHORT = RWH_WRITE_LIFE_SHORT,
|
|
WRITE_LIFE_MEDIUM = RWH_WRITE_LIFE_MEDIUM,
|
|
WRITE_LIFE_LONG = RWH_WRITE_LIFE_LONG,
|
|
WRITE_LIFE_EXTREME = RWH_WRITE_LIFE_EXTREME,
|
|
WRITE_LIFE_HINT_NR,
|
|
} __packed;
|
|
|
|
/* Sparse ignores __packed annotations on enums, hence the #ifndef below. */
|
|
#ifndef __CHECKER__
|
|
static_assert(sizeof(enum rw_hint) == 1);
|
|
#endif
|
|
|
|
#endif /* _LINUX_RW_HINT_H */
|