diff options
author | Tejun Heo <tj@kernel.org> | 2012-02-15 03:45:49 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-02-15 03:45:49 -0500 |
commit | d705ae6b133f9f6a8beee617b1224b6a5c99c5da (patch) | |
tree | b1a0b09ae01f8385e66c021c338106b88e8d23f8 /include/linux/iocontext.h | |
parent | 7ada1dd62804ca9ce1cb8666c6e563cd92fa50c1 (diff) |
block: replace icq->changed with icq->flags
icq->changed was used for ICQ_*_CHANGED bits. Rename it to flags and
access it under ioc->lock instead of using atomic bitops.
ioc_get_changed() is added so that the changed part can be fetched and
cleared as before.
icq->flags will be used to carry other flags.
Signed-off-by: Tejun Heo <tj@kernel.org>
Tested-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/iocontext.h')
-rw-r--r-- | include/linux/iocontext.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h index 119773eebe31..17839c7b9614 100644 --- a/include/linux/iocontext.h +++ b/include/linux/iocontext.h | |||
@@ -6,8 +6,10 @@ | |||
6 | #include <linux/workqueue.h> | 6 | #include <linux/workqueue.h> |
7 | 7 | ||
8 | enum { | 8 | enum { |
9 | ICQ_IOPRIO_CHANGED, | 9 | ICQ_IOPRIO_CHANGED = 1 << 0, |
10 | ICQ_CGROUP_CHANGED, | 10 | ICQ_CGROUP_CHANGED = 1 << 1, |
11 | |||
12 | ICQ_CHANGED_MASK = ICQ_IOPRIO_CHANGED | ICQ_CGROUP_CHANGED, | ||
11 | }; | 13 | }; |
12 | 14 | ||
13 | /* | 15 | /* |
@@ -88,7 +90,7 @@ struct io_cq { | |||
88 | struct rcu_head __rcu_head; | 90 | struct rcu_head __rcu_head; |
89 | }; | 91 | }; |
90 | 92 | ||
91 | unsigned long changed; | 93 | unsigned int flags; |
92 | }; | 94 | }; |
93 | 95 | ||
94 | /* | 96 | /* |
@@ -139,6 +141,7 @@ struct io_context *get_task_io_context(struct task_struct *task, | |||
139 | gfp_t gfp_flags, int node); | 141 | gfp_t gfp_flags, int node); |
140 | void ioc_ioprio_changed(struct io_context *ioc, int ioprio); | 142 | void ioc_ioprio_changed(struct io_context *ioc, int ioprio); |
141 | void ioc_cgroup_changed(struct io_context *ioc); | 143 | void ioc_cgroup_changed(struct io_context *ioc); |
144 | unsigned int icq_get_changed(struct io_cq *icq); | ||
142 | #else | 145 | #else |
143 | struct io_context; | 146 | struct io_context; |
144 | static inline void put_io_context(struct io_context *ioc) { } | 147 | static inline void put_io_context(struct io_context *ioc) { } |