]> git.baikalelectronics.ru Git - kernel.git/commit
block: move blkcg initialization/destroy into disk allocation/release handler
authorMing Lei <ming.lei@redhat.com>
Tue, 8 Mar 2022 05:51:55 +0000 (06:51 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 9 Mar 2022 02:40:01 +0000 (19:40 -0700)
commit10ef9e4eaec666a24efd0e8fc7ac1b1be28b84dd
treeaffbee31ae4a5aa5f88a7a8eb75a89a26d016332
parentc165f6ccb18f1c9510fc9f0a7a5d38cd9564d3ac
block: move blkcg initialization/destroy into disk allocation/release handler

blkcg works on FS bio level, so it is reasonable to make both blkcg and
gendisk sharing same lifetime. Meantime there won't be any FS IO when
releasing disk, so safe to move blkcg initialization/destroy into disk
allocation/release handler

Long term, we can move blkcg into gendisk completely.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20220308055200.735835-10-hch@lst.de
[axboe: fixup missing blk-cgroup.h include]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
block/blk-sysfs.c
block/genhd.c