Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp895767rwb; Mon, 26 Sep 2022 07:13:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5OodB3z+pYNSydTOufediCisK4Ctl6b8wtry1Yl+YXeaOczeqheflHl3xFnwtYrIIS1+8b X-Received: by 2002:a17:906:730b:b0:782:2eaf:a4ad with SMTP id di11-20020a170906730b00b007822eafa4admr19533242ejc.27.1664201592564; Mon, 26 Sep 2022 07:13:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664201592; cv=none; d=google.com; s=arc-20160816; b=fYixNzVkwLt63RySUg48VaW9gU7Zo+V9BfkgOWjxp4T6ZwGizrHmO9zTPkH5BmAGoN BfsJdi1lLt6OAuZ/PUgNxoU3duTeapBnU//xTR+W9M/s4GmczohsuLTvYSlw07s9TtOf DH5ZEHlPoNpne32iys8UTpiKoJBt+V5TJkRp9uEVBSKxHGXl/T9x3ojzcMZEdn+JPzJZ u78Pv5KZe6GP3zIsjJHfxUfYkylyIiqEAPijOfq2A7qotSZsUjQorY9G8e7oyZ3kqKXs plhIxFyhKlutaWh13G02At+rPMs9gbUn4nrY5JFoScdcbn4Re7Zzsvg0DX15YwY3QC7K jcDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cJ5kPWFxrtKx0V7K89/syZb2S666apNoUScWeLPjpqc=; b=z4LQTtcvEiwWmodfAWFw5LyOYbyor1fJ9TcEor4b/2ThiwH50pmeM4hhVU4cDLZvah 73ep2H8vGrFTBtLZ1VpMCVe99miDwY3qVZmfQT1Q5nTzTyZxDxkMQFRnoFqXvaa87c7o WSLtnT+3U4pr0H+8gC1lh0XJU8E5rSJN28T9IJZGVgeLBhJD1JJo73oryR2uJ+jvb10B f1SXv8wdTqUho0OqL5p8oZMTvfdL+s8J5Fn6LMctJdCWlEUixwdPAX8B5VPDpCFk7LoQ v9XLihkdP96irA1ur3SJu9eP5LrgdJ3vqqOyWhq3micV/yoIGzXFPEOdm63CSBqwlcIC Qdtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="sHG/+NXw"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z27-20020a1709060adb00b0073de493b83esi18429ejf.147.2022.09.26.07.12.33; Mon, 26 Sep 2022 07:13:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="sHG/+NXw"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239267AbiIZMGm (ORCPT + 99 others); Mon, 26 Sep 2022 08:06:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238995AbiIZMDC (ORCPT ); Mon, 26 Sep 2022 08:03:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FCD87D79E; Mon, 26 Sep 2022 03:53:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B6C9CB80906; Mon, 26 Sep 2022 10:51:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AE6BC433C1; Mon, 26 Sep 2022 10:51:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664189515; bh=ozJJzteAivKTxCNtCjbQSEkkc2fO/BrN+rWsBuy/hbE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sHG/+NXw/4rfiXlOSVKjQcy3YaDJM/k/TceNUG7vtWcRFyuI+u9ihn6DkMwlVl2zC wAL0iPfS/FCB1sKR+wS8/rtIvZgkqQ65rnoVI96Ax5nxrs2nXv/U2gMuKifUGECMR5 Qve/uL4ZSnADtYL3KwMe70q6C52jPqzZ8JamHswQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoph Hellwig , Jens Axboe Subject: [PATCH 5.19 207/207] Revert "block: freeze the queue earlier in del_gendisk" Date: Mon, 26 Sep 2022 12:13:16 +0200 Message-Id: <20220926100815.885168198@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100806.522017616@linuxfoundation.org> References: <20220926100806.522017616@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Hellwig commit 4c66a326b5ab784cddd72de07ac5b6210e9e1b06 upstream. 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 Link: https://lore.kernel.org/r/20220919144049.978907-1-hch@lst.de Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- block/genhd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/block/genhd.c +++ b/block/genhd.c @@ -625,7 +625,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"); @@ -649,6 +648,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);