Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp469638rdb; Sat, 17 Feb 2024 18:35:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVxADE4LiHEefffaPb34m420xUOTULw8LCo04NBopx5SXisS9J/3Obo7nFW5ElREapyAp/2AOJb0/UT4RpO3BySlIEf0cQZrw9aOF9JZQ== X-Google-Smtp-Source: AGHT+IE6mhgfMx99rX4SaNMs2AxX9EIxY0vdd1DNF78sQImOCfGtFE1XWg99zYDlP3tm85dXni5v X-Received: by 2002:a05:6808:1688:b0:3c0:449c:b6a5 with SMTP id bb8-20020a056808168800b003c0449cb6a5mr12114586oib.0.1708223759089; Sat, 17 Feb 2024 18:35:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708223759; cv=pass; d=google.com; s=arc-20160816; b=rbCoIL778cWQwAF4h0JGm8zbK+afuYyMqRgkn5G2P6xCzjqM0Cx8BwJ1nzJNDsDobD 6WU8EBFpRHCy3nA8v4aVdazvOJ6MDCSHtlYkiOUtdJXhhBOV3HPDZ7X66GoOI9qOV5bo 07LL5b4cUwQOnNi1JYmEaAH+A0NhxD8/aF0K6WH8gbVdxJe2NHZoK+Ez9cS8DuJil5jS A+ULs3/Q25/yBFH0KTWQAIonISG3XPiQkieyKkT04iiY5gmaPOChl1vdlBqVkIOOy7sH s3OAtqT7M1WxfJqHF0WC63jeFPx4hnrLow/MfNEcimchvr5V6GPJa3reZRzkenFdHbNm ZLDA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:date:message-id:from :references:cc:to:subject; bh=ouSOEwD+kn6eXIoi0UJxc5bCMdczdtMesCVe6QNSw48=; fh=15xdP+Cg9nZTMIr29Mx30BeoajpHJAP24kQTyzzX48c=; b=y+z5vLmAd4iwRQo74AUq/9r8ulG/hA+tOVmLV9bJKYdy7B35CNbhxfctiQCll5BZJk 8FwdhFNXvxzeILUsLeFaHppXhTrZEWsBJ8mh/+iCI/mEhAXWotMQR/DzEWXFAy7YLHBn A5CP5eyA44Yy+c/7A+HQV7hkXOMxic5gMXHHGWBkGJyf1dz86/iBTFSshLWLzQEflZ3f sA7JfcubTBNnryjdU7XPqVdKH3rGEEJatx+hdUqNoaaEuNzL+C6tbtCXT4rM4p0xRUwq 2jwc5sqW2xKfugzKIn5FYOjpVyp8dFexGWESC3LTCadjWg+N93ELcoHFwA5tvqjE+n0G uu4Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-70156-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70156-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l126-20020a633e84000000b005d5c0ffa481si2253227pga.455.2024.02.17.18.35.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 18:35:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70156-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-70156-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70156-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 5E53CB216E8 for ; Sun, 18 Feb 2024 02:35:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC1F21865; Sun, 18 Feb 2024 02:35:40 +0000 (UTC) Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6906937E; Sun, 18 Feb 2024 02:35:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708223740; cv=none; b=vDJ8ZbkBaxpDPlznjfldVmdpqxY4Z8BXJ3Pvj+uu/X78mrhoNdLenRCVZEFaWNmimvdmYcLkJfdQSok327Y8n/K/1tpzbMt8L6nw48dPs5gw3Nri2pkYHcEVdCodfpC+kv3S6aQvGywjPRaTL6fPkji+oPvJ8ol7cFj2QshPV6I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708223740; c=relaxed/simple; bh=leGPgphqqZKQDrdYTRKl8IRvjfFKKgpBNV7tyP95ofc=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=DqrbYctuIknY6WU98oxURQQuaqBiyEO+11hiZCQw3bryC23hyr8RTR92hoB/0bCn9peJkKRs72bLc0YEwe1ZWtW8BrrdwONc1d70tLB9WBMUia2v+Ort/VrdNxDFz5o7R59p1CtpdPI/3vG6LU0C5+qMPIkZy+1L+UxBMe1muLg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4TcqXM6ldsz4f3jpq; Sun, 18 Feb 2024 10:35:31 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 0702C1A0232; Sun, 18 Feb 2024 10:35:35 +0800 (CST) Received: from [10.174.176.73] (unknown [10.174.176.73]) by APP1 (Coremail) with SMTP id cCh0CgAX6RH1bNFlhJJqEQ--.29270S3; Sun, 18 Feb 2024 10:35:34 +0800 (CST) Subject: Re: [PATCH v5 07/14] md: export helpers to stop sync_thread To: Song Liu , Yu Kuai Cc: mpatocka@redhat.com, heinzm@redhat.com, xni@redhat.com, blazej.kucman@linux.intel.com, agk@redhat.com, snitzer@kernel.org, dm-devel@lists.linux.dev, jbrassow@f14.redhat.com, neilb@suse.de, shli@fb.com, akpm@osdl.org, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, yi.zhang@huawei.com, yangerkun@huawei.com, "yukuai (C)" References: <20240201092559.910982-1-yukuai1@huaweicloud.com> <20240201092559.910982-8-yukuai1@huaweicloud.com> From: Yu Kuai Message-ID: Date: Sun, 18 Feb 2024 10:35:33 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID:cCh0CgAX6RH1bNFlhJJqEQ--.29270S3 X-Coremail-Antispam: 1UD129KBjvJXoW7uw1fKFWDKF48ZF1rXw45GFg_yoW8Jw17pr WxtFZ0yr4YyFZ5Zr42q3ZruayFvw1jgFyDtrW3GF1fJF93KFs7JF1Y9ryUCFykAa4I9F4U tay0qFZxZry8WF7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU9Y14x267AKxVW5JVWrJwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4U JVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gc CE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvEwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lFIxGxcIEc7CjxVA2Y2ka 0xkIwI1lc7I2V7IY0VAS07AlzVAYIcxG8wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7x kEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E 67AF67kF1VAFwI0_GFv_WrylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCw CI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6Fyj6rWU JwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCT nIWIevJa73UjIFyTuYvjfUF0eHDUUUU X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ Hi, 在 2024/02/16 6:27, Song Liu 写道: > On Thu, Feb 1, 2024 at 1:30 AM Yu Kuai wrote: >> > [...] >> + >> static void idle_sync_thread(struct mddev *mddev) >> { >> mutex_lock(&mddev->sync_mutex); >> - clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); >> >> if (mddev_lock(mddev)) { >> mutex_unlock(&mddev->sync_mutex); >> return; >> } >> >> + clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); >> stop_sync_thread(mddev, false, true); >> mutex_unlock(&mddev->sync_mutex); >> } >> @@ -4936,13 +4965,13 @@ static void idle_sync_thread(struct mddev *mddev) >> static void frozen_sync_thread(struct mddev *mddev) >> { >> mutex_lock(&mddev->sync_mutex); >> - set_bit(MD_RECOVERY_FROZEN, &mddev->recovery); >> >> if (mddev_lock(mddev)) { >> mutex_unlock(&mddev->sync_mutex); >> return; >> } >> >> + set_bit(MD_RECOVERY_FROZEN, &mddev->recovery); >> stop_sync_thread(mddev, false, false); >> mutex_unlock(&mddev->sync_mutex); >> } > > The two changes above (moving set_bit) don't seem to belong > to this patch. If they are still needed, please submit a separate > patch. Yes, they are not needed in this patchset. I forgot to remove them while solving conflicts with other patches locally. Thanks, Kuai > > Thanks, > Song > > . >