Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp469312rdb; Sat, 17 Feb 2024 18:34:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVzzOXKJ9eQGT4sIUxt8Us0JrMFY4GyK2BsfEnLtcgio686r7ctlTxvT+M+oLUIFTzIKD5rq1mukNsw86yjcbky8eyPDeufAhrLotEQsA== X-Google-Smtp-Source: AGHT+IFp07jv2aD+5znbMLg79S1d+qL4b6lhfem7+xcnKQKfXGOeQqFnCkOb3sccNf1m7/5JsfGH X-Received: by 2002:aa7:da0a:0:b0:564:648b:69d4 with SMTP id r10-20020aa7da0a000000b00564648b69d4mr26884eds.14.1708223667364; Sat, 17 Feb 2024 18:34:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708223667; cv=pass; d=google.com; s=arc-20160816; b=fmuvFHzEpeBoFQWhQchI2T3dvJxoHvOhqLfL3SC/0Lr+JMsd+KB0AJTUz2wc1TGyJL 9lUzyi7qTUmhA17RqouoUpKtzUErHFxU0vKZqhA79SA79Bjl2YTu9a9/e/2UtGGltYqK saZpoPHnQOz1kTxU3VDVpWquYKIAP3LhPm7IqVH36v6QeSqwc6/xHbd8RaqTcS9HDSTF U2o8dNZDW+eyqLp9rhEaICWtoWRv4K1CoPdQ6M96ahR1f0oho1mTcVZp9sPl3xPRicMa s3qWPgMZXiu5OvFKv767D4+bsAEj0gJT2X6croSMSU/RreoV021cXG7hk+7Dd1iIMNDN DtCA== 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=SLIaIIDrZBZEwq/pKER1/RJKgZ686OS/bU67aGx30Ts=; fh=hpgXmDcHmoAP7QiZFPl4dBcSK4LHxEp3OCRhZY9sl74=; b=P4tm863Grt2BqbXuGcRx1G5qTvMo4BqD7kWA7blTpwXPLBMK6QuIPH0/SnA5a4HQci QBMCea2+bYeUljhQiiF9jnf3/2xOBnxvHcz6c9qpariX+xSn7L73qCo9PDplG033qdMP mgKnCxlh1EVCGR5CHdBYPpHCKxtId1HX5Nuc+4cxVfEdf36/sA54hI7EtaLfrSyTI/Uo z+rrhai3vGmkdo8EiGdwq2QIEp7t50/FaKQKCAZd9bP4PK1Eo29YuU1UXrltIOYzljUw yLB0u6t0Gvr1xua9dyulR43QF1sVH3fVbwFtgIFwqLmyFH/MoPRL/cWerX/ikBwfuSBN xV/A==; 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-70155-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70155-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id cm23-20020a0564020c9700b0056434e616adsi681005edb.38.2024.02.17.18.34.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 18:34:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70155-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-70155-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70155-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 228521F21BE7 for ; Sun, 18 Feb 2024 02:34:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 67AC3184F; Sun, 18 Feb 2024 02:34:17 +0000 (UTC) Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) (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 7F953376; Sun, 18 Feb 2024 02:34:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708223656; cv=none; b=cI0wssEi3g2mxdupSM1m6Ndq/2f+STnV//+lwJfOTmDd0u4RQzyxTp8kLH9dDlMj0WmjRZ+87t22rwsqe/sTH9iflyWjGfNIBDsI2umNVmPqMTv6VIrVtKmFEtQVw318G75po7h+V8UenARmkOpOb9K/Uq1CmetRcqLkCvr9Hbo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708223656; c=relaxed/simple; bh=Ugvg8t9WYayZSxLRPxos4Dl4AVqyS7pRUpFqPxEHeII=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=ESbnFrteVq8sKURPi9hwUuUX/YIOpW9emjNyrVIM9GY6TFQTb88Ei4bq8EzGnrddIo3qawFEILj168vB5jNzybYCG4SWdclaRy7fANp6d6WWEYignPz/X7QhuE0imXd32wqBU5RK3h2I5L1tMTBsqC5wprQy2cOdX6f1JTFCWNg= 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.56 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 dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4TcqVj5TcGz4f3jsp; Sun, 18 Feb 2024 10:34:05 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 9926D1A027B; Sun, 18 Feb 2024 10:34:10 +0800 (CST) Received: from [10.174.176.73] (unknown [10.174.176.73]) by APP1 (Coremail) with SMTP id cCh0CgAn+RGgbNFlAXhqEQ--.56890S3; Sun, 18 Feb 2024 10:34:10 +0800 (CST) Subject: Re: [PATCH v5 01/14] md: don't ignore suspended array in md_check_recovery() To: Xiao Ni , Yu Kuai Cc: mpatocka@redhat.com, heinzm@redhat.com, blazej.kucman@linux.intel.com, agk@redhat.com, snitzer@kernel.org, dm-devel@lists.linux.dev, song@kernel.org, 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-2-yukuai1@huaweicloud.com> <64d27757-9387-09dc-48e8-a9eedd67f075@huaweicloud.com> From: Yu Kuai Message-ID: Date: Sun, 18 Feb 2024 10:34:08 +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:cCh0CgAn+RGgbNFlAXhqEQ--.56890S3 X-Coremail-Antispam: 1UD129KBjvJXoW7Kr1kJr48uryUJFy7tr48Crg_yoW8Xryfpa 48ta1rKr4UAr17Aw12va10q34Sya1FgrWUAr97tr18C3s8Za4fAFWSqFW5AFyDGFZ3GanI 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02/18 9:33, Xiao Ni 写道: >>> The deadlock problem mentioned in this patch should not be right? >> >> No, I think it's right. Looks like you are expecting other problems, >> like mentioned in patch 6, to be fixed by this patch. > > Hi Kuai > > Could you explain why step1 and step2 from this comment can happen > simultaneously? From the log, the process should be > The process is : > dev_remove->dm_destroy->__dm_destroy->dm_table_postsuspend_targets(raid_postsuspend) > -> dm_table_destroy(raid_dtr). > After suspending the array, it calls raid_dtr. So these two functions > can't happen simultaneously. You're removing the target directly, however, dm can suspend the disk directly, you can simplily: 1) dmsetup suspend xxx 2) dmsetup remove xxx Please also take a look at other patches, why step 1) can't stop sync thread. Thanks, Kuai > > >> >> Noted that this patch just fix one case that MD_RECOVERY_RUNNING can't >> be cleared, I you are testing this patch alone, please make sure that >> you still triggered the exactly same case: >> >> - MD_RCOVERY_RUNNING can't be cleared while array is suspended. > > I'm not testing this patch. I want to understand the patch well. So I > need to understand the issue first. I can't understand how this > deadlock (step1,step2) happens. > > Regards > Xiao >> >> Thanks, >> Kuai >> > > . >