diff options
author | Dennis Zhou <dennis@kernel.org> | 2018-12-05 20:10:31 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-08 08:26:37 +0300 |
commit | 5cdf2e3fea5ee37b66842d76a9b06e6dac0b933d (patch) | |
tree | b460ef1ba02562982e2f000e704ce7214be4d5f3 /block/bio.c | |
parent | 892ad71f622bbf39c6de321d5ca9b0fdec237c24 (diff) | |
download | linux-5cdf2e3fea5ee37b66842d76a9b06e6dac0b933d.tar.xz |
blkcg: associate blkg when associating a device
Previously, blkg association was handled by controller specific code in
blk-throttle and blk-iolatency. However, because a blkg represents a
relationship between a blkcg and a request_queue, it makes sense to keep
the blkg->q and bio->bi_disk->queue consistent.
This patch moves association into the bio_set_dev macro(). This should
cover the majority of cases where the device is set/changed keeping the
two pointers consistent. Fallback code is added to
blkcg_bio_issue_check() to catch any missing paths.
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bio.c')
-rw-r--r-- | block/bio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/bio.c b/block/bio.c index 41ebb3f8e2fc..1e852ab904aa 100644 --- a/block/bio.c +++ b/block/bio.c @@ -2074,6 +2074,7 @@ void bio_associate_blkg(struct bio *bio) rcu_read_unlock(); } +EXPORT_SYMBOL_GPL(bio_associate_blkg); /** * bio_disassociate_task - undo bio_associate_current() |