]> nv-tegra.nvidia Code Review - linux-2.6.git/commit - block
block, cfq: reorganize cfq_io_context into generic and cfq specific parts
authorTejun Heo <tj@kernel.org>
Tue, 13 Dec 2011 23:33:41 +0000 (00:33 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 13 Dec 2011 23:33:41 +0000 (00:33 +0100)
commitc58698073218f2c8f2fc5982fa3938c2d3803b9f
treeccd2403fd8674051a062efd2c22e6fdd179b7b8f
parent22f746e235a5cbee2a6ca9887b1be2aa7d31fe71
block, cfq: reorganize cfq_io_context into generic and cfq specific parts

Currently io_context and cfq logics are mixed without clear boundary.
Most of io_context is independent from cfq but cfq_io_context handling
logic is dispersed between generic ioc code and cfq.

cfq_io_context represents association between an io_context and a
request_queue, which is a concept useful outside of cfq, but it also
contains fields which are useful only to cfq.

This patch takes out generic part and put it into io_cq (io
context-queue) and the rest into cfq_io_cq (cic moniker remains the
same) which contains io_cq.  The following changes are made together.

* cfq_ttime and cfq_io_cq now live in cfq-iosched.c.

* All related fields, functions and constants are renamed accordingly.

* ioc->ioc_data is now "struct io_cq *" instead of "void *" and
  renamed to icq_hint.

This prepares for io_context API cleanup.  Documentation is currently
sparse.  It will be added later.

Changes in this patch are mechanical and don't cause functional
change.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-ioc.c
block/cfq-iosched.c
include/linux/iocontext.h