Commit 1059699
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>1 parent 01d0c69 commit 1059699
3 files changed
+9
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | 499 | | |
503 | 500 | | |
504 | 501 | | |
505 | 502 | | |
506 | 503 | | |
507 | 504 | | |
508 | | - | |
509 | | - | |
510 | 505 | | |
511 | 506 | | |
512 | 507 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
751 | 751 | | |
752 | 752 | | |
753 | 753 | | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | 754 | | |
762 | 755 | | |
763 | 756 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
1120 | 1121 | | |
1121 | 1122 | | |
1122 | 1123 | | |
| 1124 | + | |
| 1125 | + | |
1123 | 1126 | | |
1124 | 1127 | | |
1125 | 1128 | | |
| 1129 | + | |
1126 | 1130 | | |
1127 | 1131 | | |
1128 | 1132 | | |
| |||
1328 | 1332 | | |
1329 | 1333 | | |
1330 | 1334 | | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
1331 | 1338 | | |
1332 | 1339 | | |
1333 | 1340 | | |
| |||
1340 | 1347 | | |
1341 | 1348 | | |
1342 | 1349 | | |
| 1350 | + | |
| 1351 | + | |
1343 | 1352 | | |
1344 | 1353 | | |
1345 | 1354 | | |
| |||
0 commit comments