Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3156413rwd; Mon, 29 May 2023 06:32:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ64T6gu0o6nkdQfOcW5CZpnbYx4yaUpjGD8BcH0EEDHYxviIlWBXPebK+HWKxXRnivqYl8H X-Received: by 2002:a17:90a:ae12:b0:256:2526:2de5 with SMTP id t18-20020a17090aae1200b0025625262de5mr8221768pjq.13.1685367165331; Mon, 29 May 2023 06:32:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685367165; cv=none; d=google.com; s=arc-20160816; b=li7zH8UCvBYD988uUinW23GNwR/rv8w9aolCrw0Kgg1eBK/OtNct7OVdFQpYEXMrDD LCiMJMc2KTDwNdrMMtF39uDry6ZHKoca6mXSxa824aiPA3c+HhpoBta+CbnUI2CkvnWX FuoculUdnUaWNBvRKIMzSepIz/qSjJ+IwCTjGnk11amLDN48iKRTGC3oiO/a7DMjS7MV ehQPzlwGdegJptuCAVAWrzlltAMa7jVBgPT8IMbO85LuQ1qHfMe5B1EfmY8hca9Dq5AJ cYiD2C8faquh5L0cwfKVIUTITctE6l5RGoWIQRs265RRWVrVg/uXmo8XemyNbUNuFjlG HzGw== 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=BZoESHWD+6/b6+pbkk8JkNmpx1t2BG++P5RAWR2sNz0=; b=0MkcnYAAfO+mbb+jYAdXjwSpUhc75MoxdpgOw2GP+iekf5/au2zMW9gafYA8xWCavn YbBclFPpUiXKyPXx6s5lhnHpU9TnyGIPtdF3eDgOxVE2qWvMtOt6ht0rpfA8sHtgE57g 27sp6m1emfK2lLAx0L0N6V2jJNSiXjMLVFvLTuySs7bAgLpUPbj+KcAheCuEpbnCQPDP CFm2SyjAYlrzv/5c3Pt/gZFfGIHGuYb0IMsX1tTlR56fD77CIGFoMk64wLBdlQaqGAqt XbzSxh8+UCPn/P23k0ktWWQWdWTEmGPH1QYwv8NWHaCbOaqvXdxTBW5DwYztjgZF6pii GQfQ== 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 h24-20020a17090acf1800b002565ad7d177si3597949pju.93.2023.05.29.06.32.31; Mon, 29 May 2023 06:32:45 -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 S229822AbjE2NYc (ORCPT + 99 others); Mon, 29 May 2023 09:24:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229787AbjE2NYW (ORCPT ); Mon, 29 May 2023 09:24:22 -0400 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31D2390; Mon, 29 May 2023 06:24:21 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4QVGTD068Vz4f3nCC; Mon, 29 May 2023 21:24:16 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP4 (Coremail) with SMTP id gCh0CgAHvbB9p3RkWVPoKQ--.23397S9; Mon, 29 May 2023 21:24:17 +0800 (CST) From: Yu Kuai To: guoqing.jiang@linux.dev, agk@redhat.com, snitzer@kernel.org, dm-devel@redhat.com, song@kernel.org Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, yukuai3@huawei.com, yukuai1@huaweicloud.com, yi.zhang@huawei.com, yangerkun@huawei.com Subject: [PATCH -next v2 5/6] md: wake up 'resync_wait' at last in md_reap_sync_thread() Date: Mon, 29 May 2023 21:20:36 +0800 Message-Id: <20230529132037.2124527-6-yukuai1@huaweicloud.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230529132037.2124527-1-yukuai1@huaweicloud.com> References: <20230529132037.2124527-1-yukuai1@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgAHvbB9p3RkWVPoKQ--.23397S9 X-Coremail-Antispam: 1UD129KBjvdXoW7Jr1rKr4fKrWfZFW3GF4fAFb_yoWkuFX_WF 9xZrWkXry7W39rKr1Yvw4SvrZ5tws8Ww1kZFyftFyjyFW5J348Jr93uw15Zwn3u3y7G34Y krWj9FWfZrW5GjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbq8FF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUAVCq3wA2048vs2 IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28E F7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWxJr0_Gc Wl84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1l e2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI 8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwAC jcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lFIxGxcIEc7CjxVA2Y2ka0x kIwI1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AK xVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrx kI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Gr0_Xr1lIxAIcVC0I7IYx2IY6xkF7I0E14v2 6r4UJVWxJr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F 4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr1j6F4UJbIYCTnIWIevJa73UjIFyTuYvjfUF18B UUUUU X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 md_reap_sync_thread() is just replaced with wait_event(resync_wait, ...) from action_store(), just make sure action_store() will still wait for everything to be done in md_reap_sync_thread(). Signed-off-by: Yu Kuai --- drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index 7912de0e4d12..f90226e6ddf8 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -9531,7 +9531,6 @@ void md_reap_sync_thread(struct mddev *mddev) if (mddev_is_clustered(mddev) && is_reshaped && !test_bit(MD_CLOSING, &mddev->flags)) md_cluster_ops->update_size(mddev, old_dev_sectors); - wake_up(&resync_wait); /* flag recovery needed just to double check */ set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); sysfs_notify_dirent_safe(mddev->sysfs_completed); @@ -9539,6 +9538,7 @@ void md_reap_sync_thread(struct mddev *mddev) md_new_event(); if (mddev->event_work.func) queue_work(md_misc_wq, &mddev->event_work); + wake_up(&resync_wait); } EXPORT_SYMBOL(md_reap_sync_thread); -- 2.39.2