Skip to contentSkip to conversation

Revert "block: freeze the queue earlier in del_gendisk"

PATCH Applied Christoph Hellwig 2 participants 2 messages Sep 19, 2022 – Sep 20, 2022 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "block: freeze the queue earlier in del_gendisk"

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.

---
 block/genhd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
block/genhd.c +2 -1
index d36fabf0abc1f..988ba52fd3316 100644
@@ -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);
Signature · 1 line
2.30.2
maintainer Applied
#1 lore raw
Quoted 9 lines · Christoph Hellwig

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,

Signature · 1 line
Jens Axboe