summaryrefslogtreecommitdiff
path: root/block/blk-throttle.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-02-14 19:33:04 +0100
committerJens Axboe <axboe@kernel.dk>2023-02-14 14:24:09 -0700
commit1231039db31cf0703996d0b1797c2702e25a110a (patch)
tree674b09536ab325769e3982eec25a7b37391f2d90 /block/blk-throttle.c
parent2f1e07dda1e1310873647abc40bbc49eaf3b10e3 (diff)
Revert "blk-cgroup: move the cgroup information to struct gendisk"
This reverts commit 3f13ab7c80fdb0ada86a8e3e818960bc1ccbaa59 as a patch it depends on caused a few problems. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20230214183308.1658775-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-throttle.c')
-rw-r--r--block/blk-throttle.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index e7bd7050d684..21c8d5e871ea 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -451,8 +451,7 @@ static void blk_throtl_update_limit_valid(struct throtl_data *td)
bool low_valid = false;
rcu_read_lock();
- blkg_for_each_descendant_post(blkg, pos_css,
- td->queue->disk->root_blkg) {
+ blkg_for_each_descendant_post(blkg, pos_css, td->queue->root_blkg) {
struct throtl_grp *tg = blkg_to_tg(blkg);
if (tg->bps[READ][LIMIT_LOW] || tg->bps[WRITE][LIMIT_LOW] ||
@@ -1181,7 +1180,7 @@ static void throtl_pending_timer_fn(struct timer_list *t)
spin_lock_irq(&q->queue_lock);
- if (!q->disk->root_blkg)
+ if (!q->root_blkg)
goto out_unlock;
if (throtl_can_upgrade(td, NULL))
@@ -1323,8 +1322,7 @@ static void tg_conf_updated(struct throtl_grp *tg, bool global)
* blk-throttle.
*/
blkg_for_each_descendant_pre(blkg, pos_css,
- global ? tg->td->queue->disk->root_blkg :
- tg_to_blkg(tg)) {
+ global ? tg->td->queue->root_blkg : tg_to_blkg(tg)) {
struct throtl_grp *this_tg = blkg_to_tg(blkg);
struct throtl_grp *parent_tg;
@@ -1719,7 +1717,7 @@ void blk_throtl_cancel_bios(struct gendisk *disk)
* path need RCU protection and to prevent warning from lockdep.
*/
rcu_read_lock();
- blkg_for_each_descendant_post(blkg, pos_css, disk->root_blkg) {
+ blkg_for_each_descendant_post(blkg, pos_css, q->root_blkg) {
struct throtl_grp *tg = blkg_to_tg(blkg);
struct throtl_service_queue *sq = &tg->service_queue;
@@ -1873,8 +1871,7 @@ static bool throtl_can_upgrade(struct throtl_data *td,
return false;
rcu_read_lock();
- blkg_for_each_descendant_post(blkg, pos_css,
- td->queue->disk->root_blkg) {
+ blkg_for_each_descendant_post(blkg, pos_css, td->queue->root_blkg) {
struct throtl_grp *tg = blkg_to_tg(blkg);
if (tg == this_tg)
@@ -1920,8 +1917,7 @@ static void throtl_upgrade_state(struct throtl_data *td)
td->low_upgrade_time = jiffies;
td->scale = 0;
rcu_read_lock();
- blkg_for_each_descendant_post(blkg, pos_css,
- td->queue->disk->root_blkg) {
+ blkg_for_each_descendant_post(blkg, pos_css, td->queue->root_blkg) {
struct throtl_grp *tg = blkg_to_tg(blkg);
struct throtl_service_queue *sq = &tg->service_queue;