From patchwork Fri Aug 27 12:01:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 503388 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp1197793jab; Fri, 27 Aug 2021 05:07:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyero/QuTc07ylT3itcr46biyLAq2KkNulXLv6wAOCGGgJesy6JwzSZ2nKS2cuNE4YKhiMz X-Received: by 2002:a05:6402:1d05:: with SMTP id dg5mr9212208edb.375.1630066024006; Fri, 27 Aug 2021 05:07:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630066024; cv=none; d=google.com; s=arc-20160816; b=Wnt+XDHOTEYSoLCJHQN0Mn35WzEhGBlFNsMZdpaQmZ5oNIrgOI/cWUWVv1edHYPEDs aSZwK0Jy5OjPFYFouPYbS6U6AnjTYafxo2yCnmwRiXvZFGlvGjdo6J+vn/dCRWnBVBI5 /4+uy3qakF031fXKXR2FnSJpRuoYQOJ6bKklvsx8TtMqyG+TiO6WBa5FAupahyH+s+BA kBlV4PxBSsdGpp/3uN2eJVDJF59jor7lR1sFhG5iUpQbu1tFqL6xtMJi0MGRWSaUR/r0 QowgNrgtd3Z4Avr4I2ChI4dvxvsZSaQ16kfT2EIxgt8AUzAkwZqLGZHcXT/dc7VZhgGi cf8w== 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=WTPtnuCrM35rlLmgAFrJUTVRbuNwEnZyJ9JaUgopuuPqlRHNAdZ1A+WtDbJxk2W2q0 cv4fxMk4Ivg5nyuRGZjPk1lScKJoUlrFV8QTEH7ohwrcBx7ENJ7BBuH1Y44w3XWuJAwC hg+surBlcNj/yMsnOsy4aLDlFtzEym2tUAxN4m+9EyPWv2S/QTBsKDob0HaviPcmSQvw xcHLxsENimX6Em9Uj5CmLDkYSltH0QL9lsY4oTCfVzwNymMDeK3ifAfMF4rNawJ6rZYY yoH55KDS1JDdOVuEmMFZFaSnKUARjZAU8yFyKj+2p5dlGB1Eqh4e9IiW+ne/JJTFb32h +jlg== 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 qa36si4642051ejc.337.2021.08.27.05.07.03 for ; Fri, 27 Aug 2021 05:07:04 -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 S245152AbhH0MHu (ORCPT ); Fri, 27 Aug 2021 08:07:50 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3700 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245138AbhH0MHt (ORCPT ); Fri, 27 Aug 2021 08:07:49 -0400 Received: from fraeml742-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Gwz1n6FHhz67w17; Fri, 27 Aug 2021 20:05:33 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml742-chm.china.huawei.com (10.206.15.223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Fri, 27 Aug 2021 14:06:58 +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; Fri, 27 Aug 2021 13:06:56 +0100 From: John Garry To: CC: , , , , John Garry Subject: [PATCH v3 05/13] blk-mq-sched: Rename blk_mq_sched_alloc_{tags -> map_and_rqs}() Date: Fri, 27 Aug 2021 20:01:56 +0800 Message-ID: <1630065724-69146-6-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1630065724-69146-1-git-send-email-john.garry@huawei.com> References: <1630065724-69146-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) 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;