Skip to content
  • Tejun Heo's avatar
    block, cfq: reorganize cfq_io_context into generic and cfq specific parts · c5869807
    Tejun Heo authored
    
    
    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: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    c5869807