Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6328413rwd; Mon, 19 Jun 2023 05:57:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4bzmbnX/UG5ZrzRU/rnr4lLTLjTEoC2mfkWQjirOaG89NP591EE+cogi5MVQFCt7SRUoaJ X-Received: by 2002:a05:6a20:8e1d:b0:11d:cef6:d7dd with SMTP id y29-20020a056a208e1d00b0011dcef6d7ddmr13050820pzj.57.1687179454294; Mon, 19 Jun 2023 05:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687179454; cv=none; d=google.com; s=arc-20160816; b=cNssij+O6pfApCCcp908DehGxqkdig3L+TTwG9DaOfLinnaD+3hue9YrggsL3j5L4x uJK24xMx3jB4axD6yiYzwcOCU8vuVaBsLsr8aLWwV/aMSDtfLhyUc0JQxmvZMOMNTlLg ofIRCz66ZqMOBmgJiNj1HYjdDw247MhD1hXwMBRfpkxVYzCi6WUiFx38EErI+l6rTyhO AI492yureH/ZQu9U7S4kgkjFD9RBLs62HHUrYy6vDmeVNjbhn893Hgq0WH2W7C9Hf+Lx 9s0RtBgaW9nA0NLO/sYtTYSnKY4uby9iiMUCYCjXIXmMgM1lw4X8t6DmioJfwaBNoOTK I+Wg== 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 Return-Path: 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.57.19; Mon, 19 Jun 2023 05:57:34 -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 S229963AbjFSMuf (ORCPT + 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 ); 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 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: X-Mailing-List: linux-kernel@vger.kernel.org From: Yu Kuai 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 --- 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