linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "block: freeze the queue earlier in del_gendisk"
@ 2022-09-19 14:40 Christoph Hellwig
  2022-09-20 14:16 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2022-09-19 14:40 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, dusty, ming.lei

This reverts commit a09b314005f3a0956ebf56e01b3b80339df577cc.

Dusty Mabe reported consistent hang during CoreOS shutdown with a MD 
RAID1 setup.  Although apparently similar hangs happened before,
and this patch most likely is not the root cause it made it much
more severe.  Revert it until we can figure out what is going on
with the md driver.

Signed-off-by: Christoph Hellwig <hch@lst.de>

---
 block/genhd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/block/genhd.c b/block/genhd.c
index d36fabf0abc1f..988ba52fd3316 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -602,7 +602,6 @@ void del_gendisk(struct gendisk *disk)
 	 * Prevent new I/O from crossing bio_queue_enter().
 	 */
 	blk_queue_start_drain(q);
-	blk_mq_freeze_queue_wait(q);
 
 	if (!(disk->flags & GENHD_FL_HIDDEN)) {
 		sysfs_remove_link(&disk_to_dev(disk)->kobj, "bdi");
@@ -626,6 +625,8 @@ void del_gendisk(struct gendisk *disk)
 	pm_runtime_set_memalloc_noio(disk_to_dev(disk), false);
 	device_del(disk_to_dev(disk));
 
+	blk_mq_freeze_queue_wait(q);
+
 	blk_throtl_cancel_bios(disk->queue);
 
 	blk_sync_queue(q);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Revert "block: freeze the queue earlier in del_gendisk"
  2022-09-19 14:40 [PATCH] Revert "block: freeze the queue earlier in del_gendisk" Christoph Hellwig
@ 2022-09-20 14:16 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2022-09-20 14:16 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-block, dusty, ming.lei

On Mon, 19 Sep 2022 16:40:49 +0200, Christoph Hellwig wrote:
> This reverts commit a09b314005f3a0956ebf56e01b3b80339df577cc.
> 
> Dusty Mabe reported consistent hang during CoreOS shutdown with a MD
> RAID1 setup.  Although apparently similar hangs happened before,
> and this patch most likely is not the root cause it made it much
> more severe.  Revert it until we can figure out what is going on
> with the md driver.
> 
> [...]

Applied, thanks!

[1/1] Revert "block: freeze the queue earlier in del_gendisk"
      commit: 4c66a326b5ab784cddd72de07ac5b6210e9e1b06

Best regards,
-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-20 14:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19 14:40 [PATCH] Revert "block: freeze the queue earlier in del_gendisk" Christoph Hellwig
2022-09-20 14:16 ` Jens Axboe

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).