Skip to content

Commit 6110510

Browse files
author
Ming Lei
committed
Revert "block: freeze the queue earlier in del_gendisk"
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2155901 commit 4c66a32 Author: Christoph Hellwig <hch@lst.de> Date: Mon Sep 19 16:40:49 2022 +0200 Revert "block: freeze the queue earlier in del_gendisk" This reverts commit a09b314. 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> Link: https://lore.kernel.org/r/20220919144049.978907-1-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Ming Lei <ming.lei@redhat.com>
1 parent 5e8617a commit 6110510

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

block/genhd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,6 @@ void del_gendisk(struct gendisk *disk)
613613
* Prevent new I/O from crossing bio_queue_enter().
614614
*/
615615
blk_queue_start_drain(q);
616-
blk_mq_freeze_queue_wait(q);
617616

618617
if (!(disk->flags & GENHD_FL_HIDDEN)) {
619618
sysfs_remove_link(&disk_to_dev(disk)->kobj, "bdi");
@@ -637,6 +636,8 @@ void del_gendisk(struct gendisk *disk)
637636
pm_runtime_set_memalloc_noio(disk_to_dev(disk), false);
638637
device_del(disk_to_dev(disk));
639638

639+
blk_mq_freeze_queue_wait(q);
640+
640641
blk_throtl_cancel_bios(disk);
641642

642643
blk_sync_queue(q);

0 commit comments

Comments
 (0)