From patchwork Mon Sep 13 15:12:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 509784 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp655808jao; Mon, 13 Sep 2021 08:18:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGTsVQSu8fwtTMEMWdCdmP68hTn9TyKbeP9SXlrEd6ef1dnoSYZET0pTSU4lMayO9c7elf X-Received: by 2002:a17:907:2168:: with SMTP id rl8mr13669050ejb.42.1631546331205; Mon, 13 Sep 2021 08:18:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631546331; cv=none; d=google.com; s=arc-20160816; b=E2XQ4t8sBFu36baf3ek/dnveDUyyVQgJaL7dILpnRM8HnBcGXWj+8AJ3+OcvC/zhJz RShy/O1BKP/ogpjpousmrtlZp4pXkX/ixnz1Qv/b59Z9EC1BbVmEuDVDj3dcSFNzMZUC 8gQ9uU19qImPzTFbm+3DJcc4kbwNxE8Ee3rIXSU+5S+SuqvVFLQXqBYFto+WvlElxqwf l4Ha9eID0KQ9d86EqKiW93DRAB6EpqN/VemzxGABwO9N6e2BXvPY0PUdRX53M10Hv5Gg 8PxH/dBHNaJQQlcLCxMrVouozLvCY3jXsc0qmghepfVpPQet3zkEktchwV5kv+S1RiLu JFzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=Paz5e9pxEoNv7W8lcrWO623CLc7ymBcnFvyvtNCROIk=; b=MryMQGpncbNSQMaO/nhINZdh297fq6GXbZA0o0bW25AG407bRWQTd6aiM6I6FRyIwM edcSOfOO4+oPovBWxpuMFvxtXR1gDbx3Fd2kFoxRQF96PMSKmq4w+rHl6msLwFLmJX7T dDAItWyhGgsHyTBwo/cmTsPLS2c+/rzor2Aq/xK8HVsjk9U/XWw4wb5pUxU6j1l0/OIB IVwnQ0rCD2oRQ6Fuxyi20BlQfTuHIbZIA5hO+DkmASGi17YJSuRaH+XZ7HAgARl4/47P 4KCgYIE2xur4AUV4PnCldm0MAoiJ2S+zI0eZkYD9h8z6yJ1NQHMAcfhjcWbQKS0UjeL9 Vh1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c30si7358358ejj.786.2021.09.13.08.18.51 for ; Mon, 13 Sep 2021 08:18:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347261AbhIMPTG (ORCPT ); Mon, 13 Sep 2021 11:19:06 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3777 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346143AbhIMPSv (ORCPT ); Mon, 13 Sep 2021 11:18:51 -0400 Received: from fraeml739-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4H7VR15sgQz67wNx; Mon, 13 Sep 2021 23:15:25 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml739-chm.china.huawei.com (10.206.15.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Mon, 13 Sep 2021 17:17:31 +0200 Received: from localhost.localdomain (10.69.192.58) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Mon, 13 Sep 2021 16:17:29 +0100 From: John Garry To: CC: , , , , John Garry Subject: [PATCH RESEND v3 05/13] blk-mq-sched: Rename blk_mq_sched_alloc_{tags -> map_and_rqs}() Date: Mon, 13 Sep 2021 23:12:22 +0800 Message-ID: <1631545950-56586-6-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1631545950-56586-1-git-send-email-john.garry@huawei.com> References: <1631545950-56586-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Function blk_mq_sched_alloc_tags() does same as __blk_mq_alloc_map_and_request(), so give a similar name to be consistent. Similarly rename label err_free_tags -> err_free_map_and_rqs. Signed-off-by: John Garry Reviewed-by: Ming Lei --- block/blk-mq-sched.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.26.2 diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c index 2231fb0d4c35..5f340203e6e5 100644 --- a/block/blk-mq-sched.c +++ b/block/blk-mq-sched.c @@ -515,9 +515,9 @@ void blk_mq_sched_insert_requests(struct blk_mq_hw_ctx *hctx, percpu_ref_put(&q->q_usage_counter); } -static int blk_mq_sched_alloc_tags(struct request_queue *q, - struct blk_mq_hw_ctx *hctx, - unsigned int hctx_idx) +static int blk_mq_sched_alloc_map_and_rqs(struct request_queue *q, + struct blk_mq_hw_ctx *hctx, + unsigned int hctx_idx) { struct blk_mq_tag_set *set = q->tag_set; int ret; @@ -609,15 +609,15 @@ int blk_mq_init_sched(struct request_queue *q, struct elevator_type *e) BLKDEV_DEFAULT_RQ); queue_for_each_hw_ctx(q, hctx, i) { - ret = blk_mq_sched_alloc_tags(q, hctx, i); + ret = blk_mq_sched_alloc_map_and_rqs(q, hctx, i); if (ret) - goto err_free_tags; + goto err_free_map_and_rqs; } if (blk_mq_is_sbitmap_shared(q->tag_set->flags)) { ret = blk_mq_init_sched_shared_sbitmap(q); if (ret) - goto err_free_tags; + goto err_free_map_and_rqs; } ret = e->ops.init_sched(q, e); @@ -645,8 +645,8 @@ int blk_mq_init_sched(struct request_queue *q, struct elevator_type *e) err_free_sbitmap: if (blk_mq_is_sbitmap_shared(q->tag_set->flags)) blk_mq_exit_sched_shared_sbitmap(q); -err_free_tags: blk_mq_sched_free_requests(q); +err_free_map_and_rqs: blk_mq_sched_tags_teardown(q); q->elevator = NULL; return ret;