Skip to content
  • Tejun Heo's avatar
    blkcg: implement bio_associate_blkcg() · 1d933cf0
    Tejun Heo authored
    
    
    Currently, a bio can only be associated with the io_context and blkcg
    of %current using bio_associate_current().  This is too restrictive
    for cgroup writeback support.  Implement bio_associate_blkcg() which
    associates a bio with the specified blkcg.
    
    bio_associate_blkcg() leaves the io_context unassociated.
    bio_associate_current() is updated so that it considers a bio as
    already associated if it has a blkcg_css, instead of an io_context,
    associated with it.
    
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Cc: Jens Axboe <axboe@kernel.dk>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    1d933cf0