From patchwork Sat Nov 27 10:10:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Kuai X-Patchwork-Id: 12642173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4126FC433EF for ; Sat, 27 Nov 2021 10:00:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354146AbhK0KEE (ORCPT ); Sat, 27 Nov 2021 05:04:04 -0500 Received: from szxga02-in.huawei.com ([45.249.212.188]:27303 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353701AbhK0KCD (ORCPT ); Sat, 27 Nov 2021 05:02:03 -0500 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4J1Rrz4bGDzbj6T; Sat, 27 Nov 2021 17:58:43 +0800 (CST) Received: from kwepemm600009.china.huawei.com (7.193.23.164) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Sat, 27 Nov 2021 17:58:47 +0800 Received: from huawei.com (10.175.127.227) by kwepemm600009.china.huawei.com (7.193.23.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Sat, 27 Nov 2021 17:58:46 +0800 From: Yu Kuai To: , , CC: , , , , Subject: [PATCH 0/4] cancel all throttled bios in del_gendisk() Date: Sat, 27 Nov 2021 18:10:55 +0800 Message-ID: <20211127101059.477405-1-yukuai3@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600009.china.huawei.com (7.193.23.164) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org If del_gendisk() is done when some io are still throttled, such io will not be handled until the throttle is done, which is not necessary. This patch series handle such io in del_gendisk(). Yu Kuai (4): Revert "blk-throttle: remove tg_drain_bios" blk-throtl: don't warn in tg_drain_bios() blk-throtl: introduce blk_throtl_cancel_bios() block: cancel all throttled bios in del_gendisk() block/blk-throttle.c | 68 +++++++++++++++++++++++++++++++++++++++++--- block/blk-throttle.h | 2 ++ block/genhd.c | 2 ++ 3 files changed, 68 insertions(+), 4 deletions(-)