Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp713214lqj; Sun, 2 Jun 2024 19:50:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXNBHq2W6Br+GQ+cU0du9RK8X0LIqPSxrB10hQcZut3at6dGg+iE/tbbQuJn1wa1H/9Mcqg3qPe+SMmqIrT/zT7Ybt+L41NfWbJMtQFOA== X-Google-Smtp-Source: AGHT+IFmH+IQW2GJZe95CKB3zdTXC3e66+SvN7uY2OzSfcAo2sBnu+48xBNNfLUdETfLjj+aBUJ2 X-Received: by 2002:a05:6214:4497:b0:6ad:650a:8551 with SMTP id 6a1803df08f44-6aecd6f98a8mr107836906d6.56.1717383052602; Sun, 02 Jun 2024 19:50:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717383052; cv=pass; d=google.com; s=arc-20160816; b=cgjgr1ItPdRZ89hi1d5XA8ZQyUToa1F8A3/nNUOYZENkLyWxHxuEQlatVhhAu0Dqvy 4hlHDradaWaI8H91XfmBdLnZOiCMmKj0j4Mhk4hF2dMJUuzRGndj9LttlJGQJi8+ULLN zUnPR6GP93UR2qKmCqjiXxnjgEA4fyEaITqfDC+taIp4+VFH5SWmVQFve4V6zAqgq8bw 7EK/cFxcQT6rjQEOruXFeks3Ik0aynSEG8dwoPqAzgbWTeCgLF+EUFGMWU28y/vYkmVv Ci5/BaHzH9L9GDGiECVcJZrBbN+YqlJ3qzjnoG7lPGWgyAfiXsOTQHiM9kdz69EwrJAD 59gw== 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=A3JV3zniu7d7KlK+C9i+607xZKwCegosgWjpkC3wPGQ=; fh=9mAwijNWt9V0NJ7bMsjNY+/X2cWlc0joA4wItiAF8jo=; b=qZTLzDvDJ697l8UhHp12np9rQxyc1GHxMpHXU4Od26fRm5rdlw0MZxhFjpHcYbgY7s SiFzLJ6B5a5EpPLobZHrHesrJ6EFT/CDLMpqWK4/ghzH4UwGQEx2urFOiifyfIUTrHSD cq2gMUwen0VBLEtiHNCT/HWHcr+Z+GNWlszRYO2W7Xjpf3xJ3eEhf7DH1Hzro5N/hJT0 IEsvc00ks/O67fRwDCQJ7VoAPIDkAh6kSvCeo5TL/Z98GqGZ7wFRO9REdDiYMZtwpvA9 Z0rvCKPjPXs43eTVQq8BGfdIfnqAhBYG3NcrmMVnQJMH9rHlBtXvIeD+K/s8DwsWZJ4d hU9g==; 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-198554-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198554-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b417016si77469736d6.399.2024.06.02.19.50.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 19:50:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198554-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-198554-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198554-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 563611C20D2B for ; Mon, 3 Jun 2024 02:50:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ECCADAD5F; Mon, 3 Jun 2024 02:50:47 +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 ECC505250 for ; Mon, 3 Jun 2024 02:50:44 +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=1717383047; cv=none; b=XdENZNV1OQT0FJxUpkvM9MG/cwoD1S96KiutrcLuKjlwZ8VZJ3cU1bTB5UHJtet+syReRl+3XCPhblRkRloJTMJL3kiJFG2OPJgVo0nD2JGnmhO6qg8sV91Z9BpF/zWRx2vwUNv5IovbsTL8ZL3C5QA1uqVoWnZY7yF3wK0+1vY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717383047; c=relaxed/simple; bh=9Cuj767uAqO5fKjEM1oY17xabYsz8+VeUEz+oc7TZpc=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=gPDKM+PYxsvAyaQhV8RGDXfmRYUK/A3PbK/VvcXKuBEyVRr98lSNNj5QH/LpBUe5ebecyx5jBc5xBop2pAwUJCaJY1M/TozIe70+HcUOUMVnBy8n4B0ZN5Syjo2lzyPtFLv5Hb0rpB5tMhpI5mtwi9rhSJmD+7WPNk+PIt9sGzY= 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 4Vsyrj1ZGcz4f3lCm for ; Mon, 3 Jun 2024 10:50:29 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 3ED6F1A06E0 for ; Mon, 3 Jun 2024 10:50:40 +0800 (CST) Received: from [10.174.176.73] (unknown [10.174.176.73]) by APP1 (Coremail) with SMTP id cCh0CgBHGBF9L11mxJ2vOQ--.46547S3; Mon, 03 Jun 2024 10:50:40 +0800 (CST) Subject: Re: [PATCH] md/dm-raid: don't clear MD_RECOVERY_FROZEN after setting frozen To: linan666@huaweicloud.com, agk@redhat.com, snitzer@kernel.org, mpatocka@redhat.com, song@kernel.org, xni@redhat.com Cc: dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org, yi.zhang@huawei.com, houtao1@huawei.com, yangerkun@huawei.com, "yukuai (C)" References: <20240601090608.2847814-1-linan666@huaweicloud.com> From: Yu Kuai Message-ID: Date: Mon, 3 Jun 2024 10:50:37 +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: <20240601090608.2847814-1-linan666@huaweicloud.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID:cCh0CgBHGBF9L11mxJ2vOQ--.46547S3 X-Coremail-Antispam: 1UD129KBjvJXoWrZFy3JFy8uw15uFW3WFyrCrg_yoW8Jr4rpF 4kCa9xAr48Ar47Za9rXF1q9ayFv3ZFqr90krW7C3s5XryfGF9rW3WFgw42qFWkJFyrGFW7 JF47JF4rZF15KaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU9Y14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26w1j6s0DM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F4U JVW0owA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcVAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628vn2kI c2xKxwCYjI0SjxkI62AI1cAE67vIY487MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4 AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE 17CEb7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMI IF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_WFyUJVCq 3wCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCT nIWIevJa73UjIFyTuYvjfUoOJ5UUUUU X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ ?? 2024/06/01 17:06, linan666@huaweicloud.com ะด??: > From: Li Nan > > MD_RECOVERY_FROZEN should always remain set after array is frozen. But > in raid_message(), this flag is cleared soon after frozen. Fix it. This > flag will be cleared in md_idle_sync_thread(), there is no need to clear > it again for idle. > > Fixes: cd32b27a66db ("md/dm-raid: don't call md_reap_sync_thread() directly") > Signed-off-by: Li Nan > --- > drivers/md/dm-raid.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c > index abe88d1e6735..466740a3a522 100644 > --- a/drivers/md/dm-raid.c > +++ b/drivers/md/dm-raid.c > @@ -3744,9 +3744,10 @@ static int raid_message(struct dm_target *ti, unsigned int argc, char **argv, > > md_idle_sync_thread(mddev); > mddev_unlock(mddev); > + } else { > + clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); > } > > - clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); LGTM Reviewed-by: Yu Kuai > if (decipher_sync_action(mddev, mddev->recovery) != st_idle) > return -EBUSY; > else if (!strcasecmp(argv[0], "resync")) >