Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6327298rwd; Mon, 19 Jun 2023 05:56:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ758HNzn4PfPZV7UM6ryQlgOpb2gD6rt6ezHCgdynHJF8AvzsIguktqJjzIwisGTP0YVhBK X-Received: by 2002:a17:90b:610:b0:25e:8b7a:c48 with SMTP id gb16-20020a17090b061000b0025e8b7a0c48mr17777128pjb.1.1687179382016; Mon, 19 Jun 2023 05:56:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687179382; cv=none; d=google.com; s=arc-20160816; b=z9LBSz1qLuHkq06FhaViHFxQA+SX9zs1A85JLRpQNfujxTaaQDllLceeR+kQQnCRWo B55p+fmCWrdl35762NtLFRsODoAVh9ie9RiA8jVBW6woU2sabNqFzXP9/wS6bMn1G6Hg 1eu0Ymfs99urKelexhglqvrOIfI/EqHzRAcTtcVOK7yhz5uq0qoC8HzYDfKl19AjIsxX xHMMnnd5r0jrm5uZNowgLoScZccxkUQN3fxbQAsBXkUp2IcPUrrY/6k9FIClASDOa6iQ 17deSju3Gzzh6GzNOyi4SuSGKOPDUuTXayXMGZKcFk2wn9nyPgGr5Tq/6wFqFdegF1gK Lwhw== 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=noJYCjm1cnhYUWxMVtYG7FjjYcqpc1t0S52fvCG8VsM=; b=iMDvpKK6UypeTBiAWFqD5qPwadYNb409aZ9e6HbyarnwNv8pnIJdcpuot2HsVy5mZ5 /osrLl4FkCcMxn9BjZ2vB+wupbnZHcTKAdHPwMXX0zaqmHJxXakmdFqHzSN/DoVj0SWw xSupcQ8+C+Tgq9KVEfbgTVld1MA4vRcko9ak6BSdfOgO7o42FmIaWR0ApuJQQjfGW+il Da739keYNQ5A/5IcqkEliRtd1Ibd1L2csjs31q73I+LVYeOHfqawF1cLH4bj4ShZro9v 9w3anhQ2vkBw4UCluTpaS1vtCvwOzq8r2E34JoxWQJmXvROI+vyXhibHtZQSilyNqtSH R8Bw== 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.56.08; Mon, 19 Jun 2023 05:56:21 -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 S231269AbjFSMuO (ORCPT + 99 others); Mon, 19 Jun 2023 08:50:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231317AbjFSMt4 (ORCPT ); Mon, 19 Jun 2023 08:49:56 -0400 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25120113; Mon, 19 Jun 2023 05:49:55 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4Ql8jq2yYwz4f3rJR; 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--.51801S11; 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 7/8] md/md-linear: enable io accounting Date: Tue, 20 Jun 2023 04:48:25 +0800 Message-Id: <20230619204826.755559-8-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--.51801S11 X-Coremail-Antispam: 1UD129KBjvdXoW7GFWDCF1rKr1fAFy8tr43Wrg_yoWxKwb_uF 1fur9rur1jqr4Fgr1Yvr4SvFWYv3Z5uFykuFy7KFsayr1xZw1xtr1UGF47J3ZrZrWSqa45 ArnFqr1fXr10yjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-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-linear.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/md-linear.c b/drivers/md/md-linear.c index 4eb72b9dd933..71ac99646827 100644 --- a/drivers/md/md-linear.c +++ b/drivers/md/md-linear.c @@ -238,6 +238,7 @@ static bool linear_make_request(struct mddev *mddev, struct bio *bio) bio = split; } + md_account_bio(mddev, &bio); bio_set_dev(bio, tmp_dev->rdev->bdev); bio->bi_iter.bi_sector = bio->bi_iter.bi_sector - start_sector + data_offset; -- 2.39.2