Displaying 1 result from an estimated 1 matches for "ioprio_who_process".
2012 Feb 06
0
[PATCH] Btrfs-progs: make scrub IO priority configurable
...crub.c
@@ -22,6 +22,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
+#include <sys/syscall.h>
#include <poll.h>
#include <sys/file.h>
#include <uuid/uuid.h>
@@ -52,6 +53,11 @@ struct scrub_stats {
u64 canceled;
};
+#define IOPRIO_WHO_PROCESS 1
+#define IOPRIO_CLASS_SHIFT 13
+#define IOPRIO_PRIO_VALUE(class, data) \
+ (((class) << IOPRIO_CLASS_SHIFT) | (data))
+
struct scrub_progress {
struct btrfs_ioctl_scrub_args scrub_args;
int fd;
@@ -61,6 +67,8 @@ struct scrub_progress {
struct scrub_file_record *resumed;
int ioctl_...