From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Ismael Luceno Date: Tue, 29 Sep 2026 06:38:34 +0200 Subject: [PATCH] Provide the Linux ioprio UAPI definitions Upstream-Status: Inappropriate [workaround] Signed-off-by: Ismael Luceno --- src/linux/ioprio.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) --- /dev/null +++ b/src/linux/ioprio.h @@ -0,0 +1,19 @@ +#ifndef _LINUX_IOPRIO_H +#define _LINUX_IOPRIO_H + +#define IOPRIO_WHO_PROCESS 1 +#define IOPRIO_WHO_PGRP 2 +#define IOPRIO_WHO_USER 3 + +#define IOPRIO_CLASS_SHIFT 13 +#define IOPRIO_CLASS_MASK 0x7 +#define IOPRIO_PRIO_MASK 0xfff +#define IOPRIO_PRIO_VALUE(class, data) \ + (((class) << IOPRIO_CLASS_SHIFT) | (data)) + +#define IOPRIO_CLASS_NONE 0 +#define IOPRIO_CLASS_RT 1 +#define IOPRIO_CLASS_BE 2 +#define IOPRIO_CLASS_IDLE 3 + +#endif /* _LINUX_IOPRIO_H */ -- .