aboutsummaryrefslogtreecommitdiff
path: root/include/linux/ioprio.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 08:50:42 +1100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 08:50:42 +1100
commitd4928196fe9ec07d18139ba2735876b0c8aa738f (patch)
treea999ee3f18b0d724b2adb15ec72854e7ade164fa /include/linux/ioprio.h
parentbb04af0e2e5bcd8d1a5d7f7d5c704f7eb328f241 (diff)
parentfebffd61816ef6d4f84189468c1d47f1df55921e (diff)
Merge branch 'cfq-ioc-share' of git://git.kernel.dk/linux-2.6-block
* 'cfq-ioc-share' of git://git.kernel.dk/linux-2.6-block: cfq-iosched: kill some big inlines cfq-iosched: relax IOPRIO_CLASS_IDLE restrictions kernel: add CLONE_IO to specifically request sharing of IO contexts io_context sharing - anticipatory changes block: cfq: make the io contect sharing lockless io_context sharing - cfq changes io context sharing: preliminary support ioprio: move io priority from task_struct to io_context
Diffstat (limited to 'include/linux/ioprio.h')
-rw-r--r--include/linux/ioprio.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h
index baf29387cab..2a3bb1bb743 100644
--- a/include/linux/ioprio.h
+++ b/include/linux/ioprio.h
@@ -2,6 +2,7 @@
#define IOPRIO_H
#include <linux/sched.h>
+#include <linux/iocontext.h>
/*
* Gives us 8 prio classes with 13-bits of data for each class
@@ -45,18 +46,18 @@ enum {
* the cpu scheduler nice value to an io priority
*/
#define IOPRIO_NORM (4)
-static inline int task_ioprio(struct task_struct *task)
+static inline int task_ioprio(struct io_context *ioc)
{
- if (ioprio_valid(task->ioprio))
- return IOPRIO_PRIO_DATA(task->ioprio);
+ if (ioprio_valid(ioc->ioprio))
+ return IOPRIO_PRIO_DATA(ioc->ioprio);
return IOPRIO_NORM;
}
-static inline int task_ioprio_class(struct task_struct *task)
+static inline int task_ioprio_class(struct io_context *ioc)
{
- if (ioprio_valid(task->ioprio))
- return IOPRIO_PRIO_CLASS(task->ioprio);
+ if (ioprio_valid(ioc->ioprio))
+ return IOPRIO_PRIO_CLASS(ioc->ioprio);
return IOPRIO_CLASS_BE;
}