Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1571998lqg; Sun, 3 Mar 2024 17:26:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW0hZPSMMZmzrW2iU0NZBkWrUHhVL/eDyou1H5jPkHyF1ddw05PzFyrO05RVS9aE6iSNsNAJ/asX0DRVnf+s7fUb6o0EJnrI0fpCBIEqQ== X-Google-Smtp-Source: AGHT+IHk9EL9KDa+rELgUJTKjfhyzoF1P2Y89AKw2Q13m0p1UiCQ8DT/vKG9Xlv8sJkqNjarojf4 X-Received: by 2002:a05:6102:3952:b0:472:7849:1e89 with SMTP id f18-20020a056102395200b0047278491e89mr4150934vsu.17.1709515586050; Sun, 03 Mar 2024 17:26:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709515586; cv=pass; d=google.com; s=arc-20160816; b=zbEHPuVSMYEoHYbOv9Q3+eyLPBXyN37AEqHH5+MR9N2ZvBpxIAed/hoTT40/5g/fHj 04m+ON9ZtM19ly131Q9ezrh3MiLAr4U8kOVzdmyk45EG2CW88MmThRnFEEDDF/eRNvPv Q3xJiDvl4kKWpd/25Xl4U0Ca4CDf5/Vvif5RrVUA/703Ty4AHeNmjD3WA+Q+O4WpQHBo RSeSM2fs+Rd9QwKp6i0vusYNEsRTO0Jq4jORZUMKjGoWvY8PHJrxVpejyM8TXOC1iIDE nA4SP3/AoP0c0Z6At/fGW6lQUw4pWMi04bX/byv2yAGJZhRr7/5aAd2gHZGbffQ0PBJ6 VAFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=CojaXQJJcZOQUU8jh0jnjeeaAVlOw1HZo2KWPjGs5yk=; fh=H873Akwq4u54vLjt/ClrJW3dS9VVZkESQRD8i4YXwVw=; b=yAJCZAOd792BRzbaeM3gTDvDVIpr3wLmcRx+CQ0NhFWXirRHYzssi6aykHZKVCacf2 EVTmdDPgsgA97DyvAMy1EM0l1VGcVmkOIjKtpajlqii5OsbuGUikeCxB3+i9ANqwwttL JIrt4U0jyb4usbbxKnM9PVDWxiTUEw9yLI2DXy/Kugbn4TxrzS4f+0m5FQoQGMWpzwIt SEHaa8b0msaodvoEK1aSzhNJqxTlVezJpKNggmHaSLaxB1vZiM12WV0Nwx8rehHho6Ej y9fg0QokljAvzsVn8xk55NPvoMyy4jOlOTmrZTSsD+XpRLUPkiBb425YLdYPW/08MAjn 6bhA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=asXt3tEc; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-89963-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89963-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d14-20020a05622a100e00b0042eecf805f8si1955964qte.224.2024.03.03.17.26.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 17:26:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89963-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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=asXt3tEc; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-89963-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89963-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 C3D921C20B9B for ; Mon, 4 Mar 2024 01:26:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8EBC6137E; Mon, 4 Mar 2024 01:26:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="asXt3tEc" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 AC6D12F30 for ; Mon, 4 Mar 2024 01:26:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709515572; cv=none; b=eM0wF/4KJVHHFr8PBsBw0oqaG0KEiza5/zXx+N1tTuI2Y+McMcprIB/4Vqb0sBTI9caBLGkrZ0RziQCIKiuP4a/sSAACwZN+elB3q/vS63LZBe6WfuEdFgrF4zOKdJSl62bHkF4rv8gPlkWXNhg+Qr3Ob3dmZVUSgSWmqDL9xKw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709515572; c=relaxed/simple; bh=S07ID7UsiNh9WVeNT25TX3PVNmyMCqj6IzQIEg7TTlU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=U8F1fcTLLQql/gDm43gh6sn4Bbrt8yoMkXbWPm+EGzgsEhKUko1dW57yJliiDXNKh6oeeao8Lk8BWm1oukfFYHXGY1AH/gZgMlQXQ4fWC3UxDor0TkBersqoyGNNU9n7Z0ZMzEwsK3jEb+DD1wCICdrCCjodJ2MAcxC3g03DUog= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=asXt3tEc; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709515569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CojaXQJJcZOQUU8jh0jnjeeaAVlOw1HZo2KWPjGs5yk=; b=asXt3tEcIZYnU99hRJD+S65nfTxYqBpwM60Z6B0XRGoguMZS6IzzgT2PkFYakiUylg/Tsf pgUc+wUrzdZKRHYerRzFIQX68iRcb7jO5QRftzUE38YPvRk+nZ28Ydxuc+ZMIuIFop58qh aRZ8rsrd0QgJdPq6wOx6oJ0jg58x7k4= Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-462-o0oAMIOENPeZfHGso_vZPQ-1; Sun, 03 Mar 2024 20:26:07 -0500 X-MC-Unique: o0oAMIOENPeZfHGso_vZPQ-1 Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-29a5f3804fbso2944151a91.1 for ; Sun, 03 Mar 2024 17:26:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709515567; x=1710120367; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CojaXQJJcZOQUU8jh0jnjeeaAVlOw1HZo2KWPjGs5yk=; b=gQJRPFFTIFq38iWb1c0fyzR8H0E83Jy9T3mGD/oZBqJ57gdsa+6Z4qDy6mnqXvgoyB cT5XrT+my+iLcUOXDQt0hQITVmaGB6KYLW+Fj+IPDrNCVNNZkJHmHbH55qezCTztjycg 5gWd/oFniWV7cqXvhldTd0mVCg0Xn8hKReLkbqotQxWHqikLP9hM1pgsAoRvOcb13s9T 1qXUVcK19jhm4Aqh474VeZefJxQojqVE3xlGbLLCXAwgk4jfyzGWSqlX/6RnpJhaG4F/ Bw1O0DxQ+miFEHhQ9AIk7t3m658ClXw1tWygNawNk3xlj8uC4Bpk2cRLoBDuMraChTV4 zE5w== X-Forwarded-Encrypted: i=1; AJvYcCVTxnE8hwfJBpDs1s0/WTtwb8lVOtI92Lhf/ZYmsSu8M1Wwp6Rqf1bS7xLcYlmo8xvRCeUjzUr4xIQC5x8muZlzba/pdEnkK2nU3Ry6 X-Gm-Message-State: AOJu0YwEf6v6ZxeozgPA0ImVijJjVKbnx0QNyLNW2ADyAsOfYUsvaw11 a2xITT6IGe/swi7aZqQqh58WPghoXhZg8WQDcvjch0QilTYh7gjJi1K3zJZMDi9kZkFPagwLPOn 9Aajg9Xc0WK75AZcRwUsde0OWOnriO/f+yy/7aQoY0xTkA08yp8e3XMcnzHHomFqzVtRKeowOS1 0HlmsQTNGmm+qKXY8ILhDntbcOq1re8DknB1H+ X-Received: by 2002:a17:90a:a109:b0:29a:575c:7d90 with SMTP id s9-20020a17090aa10900b0029a575c7d90mr5074297pjp.9.1709515566790; Sun, 03 Mar 2024 17:26:06 -0800 (PST) X-Received: by 2002:a17:90a:a109:b0:29a:575c:7d90 with SMTP id s9-20020a17090aa10900b0029a575c7d90mr5074285pjp.9.1709515566419; Sun, 03 Mar 2024 17:26:06 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240301095657.662111-1-yukuai1@huaweicloud.com> <0091f7d1-2273-16ff-8285-5fa3f7e2e0f7@huaweicloud.com> <35feaa54-db9e-f0d6-d5a5-a10a45bb90a5@huaweicloud.com> In-Reply-To: <35feaa54-db9e-f0d6-d5a5-a10a45bb90a5@huaweicloud.com> From: Xiao Ni Date: Mon, 4 Mar 2024 09:25:55 +0800 Message-ID: Subject: Re: [PATCH -next 0/9] dm-raid, md/raid: fix v6.7 regressions part2 To: Yu Kuai Cc: zkabelac@redhat.com, agk@redhat.com, snitzer@kernel.org, mpatocka@redhat.com, dm-devel@lists.linux.dev, song@kernel.org, heinzm@redhat.com, neilb@suse.de, jbrassow@redhat.com, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, yi.zhang@huawei.com, yangerkun@huawei.com, "yukuai (C)" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Mar 4, 2024 at 9:24=E2=80=AFAM Yu Kuai wr= ote: > > Hi, > > =E5=9C=A8 2024/03/04 9:07, Yu Kuai =E5=86=99=E9=81=93: > > Hi, > > > > =E5=9C=A8 2024/03/03 21:16, Xiao Ni =E5=86=99=E9=81=93: > >> Hi all > >> > >> There is a error report from lvm regression tests. The case is > >> lvconvert-raid-reshape-stripes-load-reload.sh. I saw this error when I > >> tried to fix dmraid regression problems too. In my patch set, after > >> reverting ad39c08186f8a0f221337985036ba86731d6aafe (md: Don't register > >> sync_thread for reshape directly), this problem doesn't appear. > > Hi Kuai > > How often did you see this tes failed? I'm running the tests for over > > two days now, for 30+ rounds, and this test never fail in my VM. I ran 5 times and it failed 2 times just now. > > Take a quick look, there is still a path from raid10 that > MD_RECOVERY_FROZEN can be cleared, and in theroy this problem can be > triggered. Can you test the following patch on the top of this set? > I'll keep running the test myself. Sure, I'll give the result later. Regards Xiao > > diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c > index a5f8419e2df1..7ca29469123a 100644 > --- a/drivers/md/raid10.c > +++ b/drivers/md/raid10.c > @@ -4575,7 +4575,8 @@ static int raid10_start_reshape(struct mddev *mddev= ) > return 0; > > abort: > - mddev->recovery =3D 0; > + if (mddev->gendisk) > + mddev->recovery =3D 0; > spin_lock_irq(&conf->device_lock); > conf->geo =3D conf->prev; > mddev->raid_disks =3D conf->geo.raid_disks; > > Thanks, > Kuai > > > > Thanks, > > Kuai > > > >> > >> I put the log in the attachment. > >> > >> On Fri, Mar 1, 2024 at 6:03=E2=80=AFPM Yu Kuai wrote: > >>> > >>> From: Yu Kuai > >>> > >>> link to part1: > >>> https://lore.kernel.org/all/CAPhsuW7u1UKHCDOBDhD7DzOVtkGemDz_QnJ4DUq_= kSN-Q3G66Q@mail.gmail.com/ > >>> > >>> > >>> part1 contains fixes for deadlocks for stopping sync_thread > >>> > >>> This set contains fixes: > >>> - reshape can start unexpected, cause data corruption, patch 1,5,6; > >>> - deadlocks that reshape concurrent with IO, patch 8; > >>> - a lockdep warning, patch 9; > >>> > >>> I'm runing lvm2 tests with following scripts with a few rounds now, > >>> > >>> for t in `ls test/shell`; do > >>> if cat test/shell/$t | grep raid &> /dev/null; then > >>> make check T=3Dshell/$t > >>> fi > >>> done > >>> > >>> There are no deadlock and no fs corrupt now, however, there are still > >>> four > >>> failed tests: > >>> > >>> ### failed: [ndev-vanilla] shell/lvchange-raid1-writemostly.sh > >>> ### failed: [ndev-vanilla] shell/lvconvert-repair-raid.sh > >>> ### failed: [ndev-vanilla] shell/lvcreate-large-raid.sh > >>> ### failed: [ndev-vanilla] shell/lvextend-raid.sh > >>> > >>> And failed reasons are the same: > >>> > >>> ## ERROR: The test started dmeventd (147856) unexpectedly > >>> > >>> I have no clue yet, and it seems other folks doesn't have this issue. > >>> > >>> Yu Kuai (9): > >>> md: don't clear MD_RECOVERY_FROZEN for new dm-raid until resume > >>> md: export helpers to stop sync_thread > >>> md: export helper md_is_rdwr() > >>> md: add a new helper reshape_interrupted() > >>> dm-raid: really frozen sync_thread during suspend > >>> md/dm-raid: don't call md_reap_sync_thread() directly > >>> dm-raid: add a new helper prepare_suspend() in md_personality > >>> dm-raid456, md/raid456: fix a deadlock for dm-raid456 while io > >>> concurrent with reshape > >>> dm-raid: fix lockdep waring in "pers->hot_add_disk" > >>> > >>> drivers/md/dm-raid.c | 93 ++++++++++++++++++++++++++++++++++-------= --- > >>> drivers/md/md.c | 73 ++++++++++++++++++++++++++-------- > >>> drivers/md/md.h | 38 +++++++++++++++++- > >>> drivers/md/raid5.c | 32 ++++++++++++++- > >>> 4 files changed, 196 insertions(+), 40 deletions(-) > >>> > >>> -- > >>> 2.39.2 > >>> > > > > > > . > > >