block, cfq: misc updates to cfq_io_context

Make the following changes to prepare for ioc/cic management cleanup.

* Add cic->q so that ioc can determine the associated queue without
  querying cfq.  This will eventually replace ->key.

* Factor out cfq_release_cic() from cic_free_func().  This function
  assumes that the caller handled locking.

* Rename __cfq_exit_single_io_context() to cfq_exit_cic() and make it
  take only @cic.

* Restructure cfq_cic_link() for future updates.

This patch doesn't introduce any functional changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Tejun Heo
2011-12-14 00:33:38 +01:00
committed by Jens Axboe
parent 09ac46c429
commit 283287a52e
2 changed files with 35 additions and 28 deletions

View File

@@ -15,6 +15,7 @@ struct cfq_ttime {
struct cfq_io_context {
void *key;
struct request_queue *q;
struct cfq_queue *cfqq[2];