From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Ming Lei <ming.lei@redhat.com>
Subject: [PATCH 2/3] block: revert aec89dc5d421 block: keep q_usage_counter in atomic mode after del_gendisk
Date: Sun, 16 Jan 2022 12:18:14 +0800 [thread overview]
Message-ID: <20220116041815.1218170-3-ming.lei@redhat.com> (raw)
In-Reply-To: <20220116041815.1218170-1-ming.lei@redhat.com>
Prepare for revert commit 8e141f9eb803 ("block: drain file system I/O
on del_gendisk").
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
block/blk-mq.c | 9 +--------
block/blk.h | 1 -
block/genhd.c | 3 +--
3 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index a6d4780580fc..cb979dcf7986 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -215,11 +215,9 @@ void blk_mq_freeze_queue(struct request_queue *q)
}
EXPORT_SYMBOL_GPL(blk_mq_freeze_queue);
-void __blk_mq_unfreeze_queue(struct request_queue *q, bool force_atomic)
+void blk_mq_unfreeze_queue(struct request_queue *q)
{
mutex_lock(&q->mq_freeze_lock);
- if (force_atomic)
- q->q_usage_counter.data->force_atomic = true;
q->mq_freeze_depth--;
WARN_ON_ONCE(q->mq_freeze_depth < 0);
if (!q->mq_freeze_depth) {
@@ -228,11 +226,6 @@ void __blk_mq_unfreeze_queue(struct request_queue *q, bool force_atomic)
}
mutex_unlock(&q->mq_freeze_lock);
}
-
-void blk_mq_unfreeze_queue(struct request_queue *q)
-{
- __blk_mq_unfreeze_queue(q, false);
-}
EXPORT_SYMBOL_GPL(blk_mq_unfreeze_queue);
/*
diff --git a/block/blk.h b/block/blk.h
index 8bd43b3ad33d..9ee7ab1c5572 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -43,7 +43,6 @@ struct blk_flush_queue *blk_alloc_flush_queue(int node, int cmd_size,
void blk_free_flush_queue(struct blk_flush_queue *q);
void blk_freeze_queue(struct request_queue *q);
-void __blk_mq_unfreeze_queue(struct request_queue *q, bool force_atomic);
void blk_queue_start_drain(struct request_queue *q);
int __bio_queue_enter(struct request_queue *q, struct bio *bio);
bool submit_bio_checks(struct bio *bio);
diff --git a/block/genhd.c b/block/genhd.c
index 6357cab37eef..9842371904d6 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -628,8 +628,7 @@ void del_gendisk(struct gendisk *disk)
/*
* Allow using passthrough request again after the queue is torn down.
*/
- blk_queue_flag_clear(QUEUE_FLAG_INIT_DONE, q);
- __blk_mq_unfreeze_queue(q, true);
+ blk_mq_unfreeze_queue(q);
}
EXPORT_SYMBOL(del_gendisk);
--
2.31.1
next prev parent reply other threads:[~2022-01-16 4:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-16 4:18 [PATCH 0/3] block: don't drain file system I/O on del_gendisk Ming Lei
2022-01-16 4:18 ` [PATCH 1/3] block: move freeing disk into queue's release handler Ming Lei
2022-01-18 8:22 ` Christoph Hellwig
2022-01-18 15:47 ` Ming Lei
2022-01-18 15:59 ` Ming Lei
2022-01-18 16:19 ` Christoph Hellwig
2022-01-16 4:18 ` Ming Lei [this message]
2022-01-16 4:18 ` [PATCH 3/3] block: revert 8e141f9eb803 block: drain file system I/O on del_gendisk Ming Lei
2022-01-17 8:13 ` [PATCH 0/3] block: don't " Christoph Hellwig
2022-01-17 9:08 ` Ming Lei
2022-01-18 8:25 ` Christoph Hellwig
2022-01-19 9:02 ` 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=20220116041815.1218170-3-ming.lei@redhat.com \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.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;
as well as URLs for NNTP newsgroup(s).