Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp446151rdb; Tue, 15 Aug 2023 01:11:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEMp9qRkQEZFbv4P7sq3oIJWun/0lEnSObtGEcqyOkxYn5dKTKnXFKEYfxHEtMdzHWrQqpH X-Received: by 2002:a17:902:b415:b0:1b8:b4d5:4c3d with SMTP id x21-20020a170902b41500b001b8b4d54c3dmr9513878plr.51.1692087095265; Tue, 15 Aug 2023 01:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692087095; cv=none; d=google.com; s=arc-20160816; b=e8iS99P0fD4ah0aFoYf0THjY5fI/pBBTkF8DrC/HUWBjdpcJV1JUnhfxB9Ca0c+r2E 9RQk+JP28g7RyVdhiGfuMZ1mSCZSbbe4g5aAsUq9ml2LcwNSz/HkMaOZjiysrLgW96Q2 xRxGMZq4TDpXbovQmplYRIdeZJxaY3237DYVbUYPpssKLg0DvNWIjN+kaXuO4idKsnat A+utC9CwqF401RtDy+4kXFaaTmmxzlpjV4favlouZ+ysl76+YboOGIe6Yz0gxWEXxJPV 1nWTfEtG8AkKp1dKFrmW+qgVWJSxQkzIcnqpGBysZ8GQX1iEDYCkMni4t5gXm+qGv7f1 ZOkw== 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 :message-id:date:subject:cc:to:from; bh=xn16aLgkW58dnFH/nhMY9hI0RhsUVa5kesUOl2TJ9dQ=; fh=IbQVS9zw4f0wpFIN30h3V23lkpsn7ElwlgfpAcJnn1g=; b=l2of2P+Ln8kSBVGQmyAYKmj1Ot5ECYCj6ms086984wsNS3w1tOImEovPMODrQuNL0i UztWOGRYpW2TIk9mJFSW2FEpzTeOxhTzC8suGjgoJ7/MnQ0nCeKwZM0ylbEN4B5n76Fd aM/8k8pwGqVgwksKCMhI9ST2653iQYOCAAmwfdaP1USf00wN1Iuc5xNJY2lp9+lRWCbI wQ17E3EP9MVYyu085blrQ07vlyzFfcpjUvstG+Ko6ePvSNTnA+7g2ZXFeW0hfc470KOs +E95VP/GiiaFfzNWOG4BISE33eJwduAeUzmHV4JxqA45J6R8L57sAv0HhsfpB8Zo3+K9 by+w== 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 m11-20020a170902768b00b001b831d26f32si9142261pll.590.2023.08.15.01.11.22; Tue, 15 Aug 2023 01:11:35 -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 S234415AbjHODPB (ORCPT + 99 others); Mon, 14 Aug 2023 23:15:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234042AbjHODOH (ORCPT ); Mon, 14 Aug 2023 23:14:07 -0400 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45CEC198C; Mon, 14 Aug 2023 20:13:38 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4RPxDX2ywGz4f3kG0; Tue, 15 Aug 2023 11:13:32 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP4 (Coremail) with SMTP id gCh0CgAXp6ld7dpknET3Ag--.64666S4; Tue, 15 Aug 2023 11:13:35 +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 v2 0/7] md: make rdev addition and removal independent from daemon thread Date: Tue, 15 Aug 2023 11:09:50 +0800 Message-Id: <20230815030957.509535-1-yukuai1@huaweicloud.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgAXp6ld7dpknET3Ag--.64666S4 X-Coremail-Antispam: 1UD129KBjvJXoW7ZF1UtrW7JFWxCF1kAF45trb_yoW8Xr1xpr yaqF1agw4UZa9rGr9xX3W7W34Fgw4rWrZrJF9xW348Cw1rurWkZryxJa18ZrWYy34ayry7 Wr1jqF95C3WkCFDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUyG14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26w1j6s0DM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F4U JVW0owA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCF04k20xvY0x0EwIxG rwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4 vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IY x2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26c xKx2IYs7xG6rW3Jr0E3s1lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x02 67AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUbXdbUUUUUU== X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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 Changes in v2: - remove patch 1 from v1 and some related patches, those patches will be sent later when rcu protection for rdev is removed. - add patch 2. This is the third patchset to do some preparatory work to synchronize io with array reconfiguration. 1) The first patchset refactor 'active_io', make sure that mddev_suspend() will wait for io to be done. [1] 2) The second patchset remove 'quiesce' callback from mddev_suspend(), so that mddev_suspend() doesn't rely on 'quiesce' callback is registered, and can be used for all personalites; [2] 3) This patchset make array reconfiguration independent from daemon thread, and synchronize it with io will be much easier because io may rely on daemon thread to be done. More patchset on the way! Yu Kuai (7): md: use separate work_struct for md_start_sync() md: factor out a helper to choose sync direction from md_check_recovery() md: delay choosing sync direction to md_start_sync() md: factor out a helper rdev_removeable() from remove_and_add_spares() md: factor out a helper rdev_is_spare() from remove_and_add_spares() md: factor out a helper rdev_addable() from remove_and_add_spares() md: delay remove_and_add_spares() for read only array to md_start_sync() drivers/md/md.c | 257 +++++++++++++++++++++++++++++------------------- drivers/md/md.h | 5 +- 2 files changed, 160 insertions(+), 102 deletions(-) -- 2.39.2