From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>, Tejun Heo <tj@kernel.org>,
Josef Bacik <josef@toxicpanda.com>
Cc: Ming Lei <ming.lei@redhat.com>,
cgroups@vger.kernel.org, linux-block@vger.kernel.org
Subject: [PATCH 2/5] Revert "blk-cgroup: delay calling blkcg_exit_disk until disk_release"
Date: Tue, 14 Feb 2023 19:33:05 +0100 [thread overview]
Message-ID: <20230214183308.1658775-3-hch@lst.de> (raw)
In-Reply-To: <20230214183308.1658775-1-hch@lst.de>
This reverts commit c43332fe028c252a2a28e46be70a530f64fc3c9d as it is not
needed without moving to disk references in the blkg.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-throttle.c | 3 +--
block/genhd.c | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 21c8d5e871eac9..74bb1e753ea09d 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -2407,8 +2407,7 @@ void blk_throtl_exit(struct gendisk *disk)
{
struct request_queue *q = disk->queue;
- if (!q->td)
- return;
+ BUG_ON(!q->td);
del_timer_sync(&q->td->service_queue.pending_timer);
throtl_shutdown_wq(q);
blkcg_deactivate_policy(disk, &blkcg_policy_throtl);
diff --git a/block/genhd.c b/block/genhd.c
index 65373738c70b02..7e031559bf514c 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -668,6 +668,8 @@ void del_gendisk(struct gendisk *disk)
rq_qos_exit(q);
blk_mq_unquiesce_queue(q);
+ blkcg_exit_disk(disk);
+
/*
* If the disk does not own the queue, allow using passthrough requests
* again. Else leave the queue frozen to fail all I/O.
@@ -1164,8 +1166,6 @@ static void disk_release(struct device *dev)
might_sleep();
WARN_ON_ONCE(disk_live(disk));
- blkcg_exit_disk(disk);
-
/*
* To undo the all initialization from blk_mq_init_allocated_queue in
* case of a probe failure where add_disk is never called we have to
--
2.39.1
next prev parent reply other threads:[~2023-02-14 18:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-14 18:33 revert blk-cgroup changs Christoph Hellwig
2023-02-14 18:33 ` Christoph Hellwig [this message]
2023-02-14 18:33 ` [PATCH 4/5] Revert "blk-cgroup: pass a gendisk to blkg_lookup" Christoph Hellwig
[not found] ` <20230214183308.1658775-1-hch-jcswGhMUV9g@public.gmane.org>
2023-02-14 18:33 ` [PATCH 1/5] Revert "blk-cgroup: move the cgroup information to struct gendisk" Christoph Hellwig
2023-02-14 21:24 ` Jens Axboe
2023-02-14 18:33 ` [PATCH 3/5] Revert "blk-cgroup: delay blk-cgroup initialization until add_disk" Christoph Hellwig
2023-02-14 18:33 ` [PATCH 5/5] Revert "blk-cgroup: pin the gendisk in struct blkcg_gq" Christoph Hellwig
2023-02-15 1:30 ` revert blk-cgroup changs Ming Lei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230214183308.1658775-3-hch@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox