diff options
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r-- | block/cfq-iosched.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index f36f8b4d04cf..cba8a5d91bfa 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -56,9 +56,6 @@ static DEFINE_SPINLOCK(ioc_gone_lock); | |||
56 | #define cfq_class_idle(cfqq) ((cfqq)->ioprio_class == IOPRIO_CLASS_IDLE) | 56 | #define cfq_class_idle(cfqq) ((cfqq)->ioprio_class == IOPRIO_CLASS_IDLE) |
57 | #define cfq_class_rt(cfqq) ((cfqq)->ioprio_class == IOPRIO_CLASS_RT) | 57 | #define cfq_class_rt(cfqq) ((cfqq)->ioprio_class == IOPRIO_CLASS_RT) |
58 | 58 | ||
59 | #define ASYNC (0) | ||
60 | #define SYNC (1) | ||
61 | |||
62 | #define sample_valid(samples) ((samples) > 80) | 59 | #define sample_valid(samples) ((samples) > 80) |
63 | 60 | ||
64 | /* | 61 | /* |
@@ -1333,14 +1330,14 @@ static void __cfq_exit_single_io_context(struct cfq_data *cfqd, | |||
1333 | if (ioc->ioc_data == cic) | 1330 | if (ioc->ioc_data == cic) |
1334 | rcu_assign_pointer(ioc->ioc_data, NULL); | 1331 | rcu_assign_pointer(ioc->ioc_data, NULL); |
1335 | 1332 | ||
1336 | if (cic->cfqq[ASYNC]) { | 1333 | if (cic->cfqq[BLK_RW_ASYNC]) { |
1337 | cfq_exit_cfqq(cfqd, cic->cfqq[ASYNC]); | 1334 | cfq_exit_cfqq(cfqd, cic->cfqq[BLK_RW_ASYNC]); |
1338 | cic->cfqq[ASYNC] = NULL; | 1335 | cic->cfqq[BLK_RW_ASYNC] = NULL; |
1339 | } | 1336 | } |
1340 | 1337 | ||
1341 | if (cic->cfqq[SYNC]) { | 1338 | if (cic->cfqq[BLK_RW_SYNC]) { |
1342 | cfq_exit_cfqq(cfqd, cic->cfqq[SYNC]); | 1339 | cfq_exit_cfqq(cfqd, cic->cfqq[BLK_RW_SYNC]); |
1343 | cic->cfqq[SYNC] = NULL; | 1340 | cic->cfqq[BLK_RW_SYNC] = NULL; |
1344 | } | 1341 | } |
1345 | } | 1342 | } |
1346 | 1343 | ||
@@ -1449,17 +1446,18 @@ static void changed_ioprio(struct io_context *ioc, struct cfq_io_context *cic) | |||
1449 | 1446 | ||
1450 | spin_lock_irqsave(cfqd->queue->queue_lock, flags); | 1447 | spin_lock_irqsave(cfqd->queue->queue_lock, flags); |
1451 | 1448 | ||
1452 | cfqq = cic->cfqq[ASYNC]; | 1449 | cfqq = cic->cfqq[BLK_RW_ASYNC]; |
1453 | if (cfqq) { | 1450 | if (cfqq) { |
1454 | struct cfq_queue *new_cfqq; | 1451 | struct cfq_queue *new_cfqq; |
1455 | new_cfqq = cfq_get_queue(cfqd, ASYNC, cic->ioc, GFP_ATOMIC); | 1452 | new_cfqq = cfq_get_queue(cfqd, BLK_RW_ASYNC, cic->ioc, |
1453 | GFP_ATOMIC); | ||
1456 | if (new_cfqq) { | 1454 | if (new_cfqq) { |
1457 | cic->cfqq[ASYNC] = new_cfqq; | 1455 | cic->cfqq[BLK_RW_ASYNC] = new_cfqq; |
1458 | cfq_put_queue(cfqq); | 1456 | cfq_put_queue(cfqq); |
1459 | } | 1457 | } |
1460 | } | 1458 | } |
1461 | 1459 | ||
1462 | cfqq = cic->cfqq[SYNC]; | 1460 | cfqq = cic->cfqq[BLK_RW_SYNC]; |
1463 | if (cfqq) | 1461 | if (cfqq) |
1464 | cfq_mark_cfqq_prio_changed(cfqq); | 1462 | cfq_mark_cfqq_prio_changed(cfqq); |
1465 | 1463 | ||