Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6326215rwd; Mon, 19 Jun 2023 05:55:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5YCuPZTuXjoZedXq+/bVTf6f+G5zJ6QZeqUsesaGcQMz+XljVdTIBhNPkwm9Z9oelBSMzN X-Received: by 2002:a05:6e02:541:b0:331:5cf:e4ca with SMTP id i1-20020a056e02054100b0033105cfe4camr8422246ils.8.1687179323614; Mon, 19 Jun 2023 05:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687179323; cv=none; d=google.com; s=arc-20160816; b=rvoMOR04Qmb43YVCDkR7bIEon+n77xVJy+fBPg+39b+NclsNl1eXiVvnPUTF8iUrk/ paD99G9v+OKHDOgbITpyPuc139UNt7BHEkrcZyns9hJqigUHssPxBuJvG//s2AqJ+ntG 7entE8WqQwOatT1P9MTElXTByQgJklen/d62XFVtJAHkBaSaJ8s2jug/gvwFxsYicRQF svpK3w+f+VxuEgzFKvkw8f0813yyNTxNUwWjVxtS2n419X1pGjILwYKpCNy4mEHt+OLt Kp6PFX2OjyDsxZqnhldLF5yGIaWX70jychnocw9yv3RfKDhNj8FSYcK5uvxtVlV4IyKj X1Ow== 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=7bsccT3nvC3Edpk0dxRaXea3PE5TAInV7j53l+2iwP0=; b=ps1qLzE0nijghXzZcpKfIbgIskIAlz8AdEGBuAxPnkTz+94r4m9JSdSJ40uDYFRDXI aHFicoHioFcymzD0iRqstvp6kXlkFTY0CVGV7ybYCWnRQu/txWUK1gzKQGhardH7Soby cumWSJuCk4WpnY7TuMayLJ2sXb1mrv0QIByhCTOIsPdj7d1klaITOSmdM94GHX385wCA yv61NxGOtqsdH0KVoQANvfCdLgBsSB+sjPb6eU1r+1a/LxYPHO9rPfz4Ih6eWuwq8trs 48Mo3elXqCBkoqWgzX87bgmSkK7xOWIAhoOfLlX5TBvXDfhufkXbAjGu8PyIErZBqLjF aCJA== 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 v9-20020a63bf09000000b005404f8dd0easi20530490pgf.292.2023.06.19.05.55.09; Mon, 19 Jun 2023 05:55:23 -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 S231263AbjFSMuK (ORCPT + 99 others); Mon, 19 Jun 2023 08:50:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231321AbjFSMt4 (ORCPT ); Mon, 19 Jun 2023 08:49:56 -0400 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2FB9128; Mon, 19 Jun 2023 05:49:55 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4Ql8jn6v6Dz4f4HGd; Mon, 19 Jun 2023 20:49:49 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP4 (Coremail) with SMTP id gCh0CgBH_rHrTpBkoNw8MA--.51801S10; Mon, 19 Jun 2023 20:49:51 +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 6/8] md/md-multipath: enable io accounting Date: Tue, 20 Jun 2023 04:48:24 +0800 Message-Id: <20230619204826.755559-7-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--.51801S10 X-Coremail-Antispam: 1UD129KBjvdXoW7GFWDCF1rKr1fAFy8tr43Wrg_yoW3Jrg_WF n09r97XrWYyFn7Kw1qvr4xZa4I9a4DW3Z7uF12gFZ5ZF15JrWrAFWq9rWUJanrAayxWa4U Aw18Jr13ZF4j9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbDAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M280x2IEY4vEnII2IxkI6r1a6r45M28IrcIa0xkI8V A2jI8067AKxVWUAVCq3wA2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJ M28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2I x0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK 6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4 xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8 JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20V AGYxC7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAF wI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCIc4 0Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1I6r4UMIIF0xvE2Ix0cI8IcVCY1x0267AK xVWxJVW8Jr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r 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, 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-multipath.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/md-multipath.c b/drivers/md/md-multipath.c index 92c45be203d7..d22276870283 100644 --- a/drivers/md/md-multipath.c +++ b/drivers/md/md-multipath.c @@ -107,6 +107,7 @@ static bool multipath_make_request(struct mddev *mddev, struct bio * bio) && md_flush_request(mddev, bio)) return true; + md_account_bio(mddev, &bio); mp_bh = mempool_alloc(&conf->pool, GFP_NOIO); mp_bh->master_bio = bio; -- 2.39.2