Message ID | 20230619204826.755559-9-yukuai1@huaweicloud.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2987802vqr; Mon, 19 Jun 2023 05:58:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5A4zSI+pwo9v/iEF+xYy8aN2xZkwCm49lDb8sIkNRl4XNDPf8+uVTFfHxwghEx4Okx0+o9 X-Received: by 2002:a17:90a:194c:b0:25b:ea12:a2f5 with SMTP id 12-20020a17090a194c00b0025bea12a2f5mr1835256pjh.35.1687179530795; Mon, 19 Jun 2023 05:58:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687179530; cv=none; d=google.com; s=arc-20160816; b=LwOM3W3OLQSWg1tmWkwXCQrM1KSBcGXgx5D5rqP4Huc2GDW1Fr91h7UQSuHLEakWnc YBgm81NQgwf/gnvTr+R/0RY5vIzIYYI4JxKsHE/EKCWbpywbeXRYONu+xp1UVbEEvT1N muyxlzJlNg6YoeCKZCGEtFxaU/hNAV7VIKOk1Uq2LzQKiYc38IPTywDSXLbAfdHy7CeF +DJ2s47txOSIJV0ikrE9TrBC2KoyHTSXd9UzBPKkde2Y+o9FyisBsUpoeLUJ7QrbkUrF qOEglinIEb7QDqjP7YHT5J1a9fohnvIDEIbTsbp0IcT8bk0gZwYICKKhK9XEyCz0semO MEeA== 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=vkLvDE8EPajSNPdXNnOVaDuFIIN3GvaWODzvTKrJPh0=; b=Opo04xkQeMDNATKcptRGB71ilzlNPCelbIb0+nyOpRMOpaBKy5SotgwIdeRH8NMoDM cTtt8lISKpfmljfdjsb9gdYjwTcq5LYvTo+H7d02RWyJCmfDT6F3cJpWt1r1G3sziZTF iBm0LN9TuytROj1B3uUKBz4JCdyOW2WT9N3+/nx/qWoUN0qD+fTRBH8Gn2J0tRt6rGGV Ez7VkRDD8jski3nuHX/wK1/DknVOorWQXSR36tkNNQdbcvZ75Guu+Ssbr7kpaMCWKhEE hdW9QRW2HIveCKAioSTaeKuGj1hsJ7Xm5x/OlSca+EYTX5oWq4Vgcqn3fXBCa2edHkf2 VDRA== 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 l189-20020a6388c6000000b0055382f1e985si6463696pgd.333.2023.06.19.05.58.35; Mon, 19 Jun 2023 05:58:50 -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 S230104AbjFSMuf (ORCPT <rfc822;duw91626@gmail.com> + 99 others); Mon, 19 Jun 2023 08:50:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231336AbjFSMt6 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 19 Jun 2023 08:49:58 -0400 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A649D91; Mon, 19 Jun 2023 05:49:57 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4Ql8jq5tWXz4f3v1N; Mon, 19 Jun 2023 20:49:51 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP4 (Coremail) with SMTP id gCh0CgBH_rHrTpBkoNw8MA--.51801S12; Mon, 19 Jun 2023 20:49:52 +0800 (CST) From: Yu Kuai <yukuai1@huaweicloud.com> To: xni@redhat.com, song@kernel.org Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yukuai1@huaweicloud.com, yi.zhang@huawei.com, yangerkun@huawei.com Subject: [PATCH -next 8/8] md/md-faulty: enable io accounting Date: Tue, 20 Jun 2023 04:48:26 +0800 Message-Id: <20230619204826.755559-9-yukuai1@huaweicloud.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230619204826.755559-1-yukuai1@huaweicloud.com> References: <20230619204826.755559-1-yukuai1@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgBH_rHrTpBkoNw8MA--.51801S12 X-Coremail-Antispam: 1UD129KBjvdXoW7GFWDCF1rKr1fAFy8tr43Wrg_yoWxuwcE9r s09rZrXr15KF18Kr1jyr4xZFWY93ZYg3WkWF17KFZxAF15Aa1IkrZ0kF4xJa13uFWfXa43 J340qw4fXr40kjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbDAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M280x2IEY4vEnII2IxkI6r1a6r45M28IrcIa0xkI8V A2jI8067AKxVWUAVCq3wA2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJ M28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2I x0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK 6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4 xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8 JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20V AGYxC7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAF wI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCIc4 0Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1I6r4UMIIF0xvE2Ix0cI8IcVCY1x0267AK xVWxJVW8Jr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F 4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0pRvJPtU UUUU= X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, KHOP_HELO_FCRDNS,MAY_BE_FORGED,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769135963912936846?= X-GMAIL-MSGID: =?utf-8?q?1769135963912936846?= |
Series |
md: fix and refactor io accounting and 'active_io'
|
|
Commit Message
Yu Kuai
June 19, 2023, 8:48 p.m. UTC
From: Yu Kuai <yukuai3@huawei.com> use md_account_bio() to enable io accounting, also make sure mddev_suspend() will wait for all io to be done. Signed-off-by: Yu Kuai <yukuai3@huawei.com> --- drivers/md/md-faulty.c | 2 ++ 1 file changed, 2 insertions(+)
Comments
On Mon, Jun 19, 2023 at 8:50 PM Yu Kuai <yukuai1@huaweicloud.com> wrote: > > From: Yu Kuai <yukuai3@huawei.com> > > use md_account_bio() to enable io accounting, also make sure > mddev_suspend() will wait for all io to be done. > > Signed-off-by: Yu Kuai <yukuai3@huawei.com> > --- > drivers/md/md-faulty.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/md/md-faulty.c b/drivers/md/md-faulty.c > index 50ad818978a4..a039e8e20f55 100644 > --- a/drivers/md/md-faulty.c > +++ b/drivers/md/md-faulty.c > @@ -204,6 +204,8 @@ static bool faulty_make_request(struct mddev *mddev, struct bio *bio) > failit = 1; > } > } > + > + md_account_bio(mddev, &bio); > if (failit) { > struct bio *b = bio_alloc_clone(conf->rdev->bdev, bio, GFP_NOIO, > &mddev->bio_set); > -- > 2.39.2 > Reviewed-by: Xiao Ni <xni@redhat.com>
diff --git a/drivers/md/md-faulty.c b/drivers/md/md-faulty.c index 50ad818978a4..a039e8e20f55 100644 --- a/drivers/md/md-faulty.c +++ b/drivers/md/md-faulty.c @@ -204,6 +204,8 @@ static bool faulty_make_request(struct mddev *mddev, struct bio *bio) failit = 1; } } + + md_account_bio(mddev, &bio); if (failit) { struct bio *b = bio_alloc_clone(conf->rdev->bdev, bio, GFP_NOIO, &mddev->bio_set);