From patchwork Sun Oct 30 03:06:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinlong Chen X-Patchwork-Id: 12807 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1614794wru; Sat, 29 Oct 2022 20:11:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4FuYAjxxgKAZtRgVE74h/LlR4W8n11FWDw/st+c/t92fonvViMhfGhxNFe1nQgURh4a7Cq X-Received: by 2002:a05:6402:12d1:b0:463:3f0c:be02 with SMTP id k17-20020a05640212d100b004633f0cbe02mr736259edx.239.1667099467173; Sat, 29 Oct 2022 20:11:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667099467; cv=none; d=google.com; s=arc-20160816; b=HrICgzxSuwcgxEEfR53o/JEYeE6G33p8vXdqyECh3lBAG7U+HiHIxH9lhOoGqtxiHg kHepTbHlHN0z2XM37irHO8UjAZKXAl7S3omUpYwZ7Ke+LtIMDbiD4H/XBLyeRjl2oWaA moYSGsPIqml0VGeek970VjHSyTjogBfQ5D8yQVjLUmSjzudxaPR6NMYsmwiF+/d0K9tX 6uvAWPhe8znOOGgascvs7eBvaRK1DgyAmJ2V1amNdqNDKBtHfuOfSsI/X8hnNoWcJQps cseXou8A0lGed9rvvyZ69B99ku9xC5wFgo8FBEF3Eqh+XNMixQQFadHLRmbtk8NQmCgX xIzg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Zw9CjljdymJxQA8GSqf36K/IXuBD8Q74dv97X7w68n4=; b=cDhh4lTvbmfcem/nCOajDtz4jKYIpAn9d3BbWJ1/0aR6Zp59sHeRe7iOF5IflBAI5S YH+rFDUHOgUpy485V1935G6fYohDR21OoZGWZCKyHPLBviG37Zpntpjouu4AzZXBv+8M STkg3TozXh0GiK2UUzUZLpgiDcj1ZCsKqxSnJqIiMeH4Zb5ynw3xda2Jgkhwm9pP4oeL nEW8soqnzkIQzoUhHmA+mnoOMD/HB98dWX4FshnbQOxPp/lc17dmEjTJwmm844kWuK45 5sx9MsFEmjt7KaVWd8PymB4JQYjFDdnIqQ8wkAAYl5KbVka9CGlMt0kpmy4eLlIa27Ij Hbng== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wt5-20020a170906ee8500b0073da5c8de1asi3057881ejb.178.2022.10.29.20.10.43; Sat, 29 Oct 2022 20:11:07 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229756AbiJ3DHf (ORCPT + 99 others); Sat, 29 Oct 2022 23:07:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbiJ3DH1 (ORCPT ); Sat, 29 Oct 2022 23:07:27 -0400 Received: from zju.edu.cn (spam.zju.edu.cn [61.164.42.155]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ED230360A1; Sat, 29 Oct 2022 20:07:25 -0700 (PDT) Received: from localhost.localdomain (unknown [10.14.30.251]) by mail-app3 (Coremail) with SMTP id cC_KCgAXlrpJ6l1jv9B1CA--.27265S4; Sun, 30 Oct 2022 11:07:18 +0800 (CST) From: Jinlong Chen To: axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, nickyc975@zju.edu.cn Subject: [PATCH v2 2/3] blk-mq: remove blk_freeze_queue Date: Sun, 30 Oct 2022 11:06:47 +0800 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: cC_KCgAXlrpJ6l1jv9B1CA--.27265S4 X-Coremail-Antispam: 1UD129KBjvJXoW7uFy3AF4rXr18ZrWruFyrtFb_yoW8Zr1xpF ZxJF47Cw1Iqr4UXrW8Jw47Xr9Iga18Kry7C3ySy3yYvrnIkFn2vF18A3W8uF40yrZ5JFsr ZrWqgrZxAr18CrDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvq1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AE w4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2 IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2 z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2vYz4IE04k24V AvwVAKI4IrM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xf McIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7 v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxAIw28IcxkI 7VAKI48JMxAIw28IcVCjz48v1sIEY20_GFWkJr1UJwCFx2IqxVCFs4IE7xkEbVWUJVW8Jw C20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAF wI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjx v20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2 jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0x ZFpf9x0JUQZ23UUUUU= X-CM-SenderInfo: qssqjiaqqzq6lmxovvfxof0/1tbiAgUTB1ZdtcKOmwAAs6 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748080490516259904?= X-GMAIL-MSGID: =?utf-8?q?1748080490516259904?= Nobody is calling blk_freeze_queue except its alias, so remove it. Signed-off-by: Jinlong Chen --- block/blk-mq.c | 18 +----------------- block/blk.h | 1 - 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 14c4165511b9..e0654a2e80b9 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -194,27 +194,11 @@ EXPORT_SYMBOL_GPL(blk_mq_freeze_queue_wait_timeout); * Guarantee no request is in use, so we can change any data structure of * the queue afterward. */ -void blk_freeze_queue(struct request_queue *q) +void blk_mq_freeze_queue(struct request_queue *q) { - /* - * In the !blk_mq case we are only calling this to kill the - * q_usage_counter, otherwise this increases the freeze depth - * and waits for it to return to zero. For this reason there is - * no blk_unfreeze_queue(), and blk_freeze_queue() is not - * exported to drivers as the only user for unfreeze is blk_mq. - */ blk_freeze_queue_start(q); blk_mq_freeze_queue_wait(q); } - -void blk_mq_freeze_queue(struct request_queue *q) -{ - /* - * ...just an alias to keep freeze and unfreeze actions balanced - * in the blk_mq_* namespace - */ - blk_freeze_queue(q); -} EXPORT_SYMBOL_GPL(blk_mq_freeze_queue); void __blk_mq_unfreeze_queue(struct request_queue *q, bool force_atomic) diff --git a/block/blk.h b/block/blk.h index 7f9e089ab1f7..e9addea2838a 100644 --- a/block/blk.h +++ b/block/blk.h @@ -37,7 +37,6 @@ struct blk_flush_queue *blk_alloc_flush_queue(int node, int cmd_size, gfp_t flags); void blk_free_flush_queue(struct blk_flush_queue *q); -void blk_freeze_queue(struct request_queue *q); void __blk_mq_unfreeze_queue(struct request_queue *q, bool force_atomic); void blk_queue_start_drain(struct request_queue *q); int __bio_queue_enter(struct request_queue *q, struct bio *bio);