1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
index de911a9..b7edce0 100644
--- a/block/bfq-cgroup.c
+++ b/block/bfq-cgroup.c
@@ -402,7 +402,7 @@ static struct bfq_group *bfq_bic_update_cgroup(struct bfq_io_cq *bic)
BUG_ON(bfqd == NULL);
rcu_read_lock();
- css = task_css(current, bfqio_subsys_id);
+ css = task_css(current, bfqio_cgrp_id);
bfqg = __bfq_bic_change_cgroup(bfqd, bic, css);
rcu_read_unlock();
@@ -765,7 +765,7 @@ static int bfqio_can_attach(struct cgroup_subsys_state *css,
struct io_context *ioc;
int ret = 0;
- cgroup_taskset_for_each(task, css, tset) {
+ cgroup_taskset_for_each(task, tset) {
/*
* task_lock() is needed to avoid races with
* exit_io_context()
@@ -799,7 +799,7 @@ static void bfqio_attach(struct cgroup_subsys_state *css,
* IMPORTANT NOTE: The move of more than one process at a time to a
* new group has not yet been tested.
*/
- cgroup_taskset_for_each(task, css, tset) {
+ cgroup_taskset_for_each(task, tset) {
ioc = get_task_io_context(task, GFP_ATOMIC, NUMA_NO_NODE);
if (ioc) {
/*
@@ -859,15 +859,13 @@ static void bfqio_css_offline(struct cgroup_subsys_state *css)
mutex_unlock(&bfqio_mutex);
}
-struct cgroup_subsys bfqio_subsys = {
- .name = "bfqio",
+struct cgroup_subsys bfqio_cgrp_subsys = {
.css_alloc = bfqio_create,
.css_online = bfqio_css_online,
.css_offline = bfqio_css_offline,
.can_attach = bfqio_can_attach,
.attach = bfqio_attach,
.css_free = bfqio_destroy,
- .subsys_id = bfqio_subsys_id,
.base_cftypes = bfqio_files,
};
#else
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index bd0d99a..225cf01 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -901,9 +901,9 @@ static void bfq_merged_requests(struct request_queue *q, struct request *rq,
* Reposition in fifo if next is older than rq.
*/
if (!list_empty(&rq->queuelist) && !list_empty(&next->queuelist) &&
- time_before(rq_fifo_time(next), rq_fifo_time(rq))) {
+ time_before(next->fifo_time, rq->fifo_time)) {
list_move(&rq->queuelist, &next->queuelist);
- rq_set_fifo_time(rq, rq_fifo_time(next));
+ rq->fifo_time = next->fifo_time;
}
if (bfqq->next_rq == next)
@@ -1504,7 +1504,7 @@ static struct request *bfq_check_fifo(struct bfq_queue *bfqq)
rq = rq_entry_fifo(bfqq->fifo.next);
- if (time_before(jiffies, rq_fifo_time(rq)))
+ if (time_before(jiffies, rq->fifo_time))
return NULL;
return rq;
@@ -3047,7 +3047,7 @@ static void bfq_insert_request(struct request_queue *q, struct request *rq)
*/
if (bfqq->bic != NULL)
bfqq->bic->wr_time_left = 0;
- rq_set_fifo_time(rq, jiffies + bfqd->bfq_fifo_expire[rq_is_sync(rq)]);
+ rq->fifo_time = jiffies + bfqd->bfq_fifo_expire[rq_is_sync(rq)];
list_add_tail(&rq->queuelist, &bfqq->fifo);
bfq_rq_enqueued(bfqd, bfqq, rq);
|