Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2964141rwb; Wed, 30 Nov 2022 13:23:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf7j8wq2BH3zqz8rctC49nksMSD9gO8zWqZsfS1jxgwhG+bmENzfiIQpBBavPSg+nxJDuSYh X-Received: by 2002:a63:da10:0:b0:477:ccac:6eb5 with SMTP id c16-20020a63da10000000b00477ccac6eb5mr28863047pgh.41.1669843382074; Wed, 30 Nov 2022 13:23:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669843382; cv=none; d=google.com; s=arc-20160816; b=ZdpC4ZnOe4aFMLi4G6ydxBV0u3hllQSV5QC47YxhJA0GfxrZXmR+cnF/tQnHmujIAt v7XLNo3WGS2zfFQGPlYQub7r8XHfGJdH3axNuaEMlMo/sVFss6+Ab95Bah3Lc4nJsg5q Tqt101Z8/xZ7E+FsIpo96N8VfQf73kjiLLqGdRAq6l+EcPrRE0r9hfTWfUXuoAUYwJaj nLX1Yr7b+ygYJJ+Y/AURna8Kd0iblw5Gt+maprESl5ybK4bMpY6HcTSjj3x581Q3C+pA /qea/IfT3h/+L95rm/mUnqi5aDaPu2a1h4oSFgPcJywFFyz7Ig47eEj87s1yJWezt0Tg BnLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=INcyUG1pGynZEfKCoq8zJyVRB9W58QFda+HbgauuuRo=; b=RMQ6KOS2u5XxMziS07JQ0BNeXLD9EINqE9PF1ZHzSSqdKsKMKmy+W1QZqeXrrzEQbE KUbCrWjeOUYl+CtkBo930CK2kNpAJ187tdiUGOWQ8/JgLN14BVZGtDQPfge0dAda5zX/ vHTbtqELwROLm5ameuuH/XSVdaFgu9OykOLuhb/RESErHWEOgOg2cZsYICxIb/23l04F PT99y8NiIiNBmC2733hRe1auniBgl0bFHKCj/ZTgKnSFY4OEGitYOBeXVjRxISy+vNDL STr5AoZIhfNheQyU2LW4x/yqCAs3xvMu1h2b8iJev/CWprgtPGeZgoU0hvB5JvIdjO2a dOGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qykynp6U; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x22-20020a056a00189600b00574fb9f77dcsi2840909pfh.226.2022.11.30.13.22.50; Wed, 30 Nov 2022 13:23:02 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qykynp6U; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229775AbiK3VI3 (ORCPT + 83 others); Wed, 30 Nov 2022 16:08:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbiK3VI1 (ORCPT ); Wed, 30 Nov 2022 16:08:27 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFA3C8659C; Wed, 30 Nov 2022 13:08:25 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 785C7B81B95; Wed, 30 Nov 2022 21:08:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38BC8C433C1; Wed, 30 Nov 2022 21:08:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669842503; bh=noqMNqOBTDPae+cbPFOdBXG8mgWA547Qeq0S6UUujaQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Qykynp6U9unyTiRJ0xf78319VbxxcO8rGguhmR1xIc3BEDY7fFhO8K/vGQIboxH7/ 2BwLjEYY+HpoJPHjNdjG2FcG6TjtyAHdj4FNVfhmpXceLcFBeVTJ38kGo6LnhMcx3t JFk+6wL/cvfFKLawP46F6l0J+kdbGCqdRSiqd9y51WEeR12wHh6F6i36tfML5jyGiY 0jlQi1sz/wASUYH63srZoJkO87IrpHCzHpv7t7EXhgnkctkdzeKShBZc2sHwc5CSIv i6rCUZz/I8MMfiPwIfRrsLm1uQ1UEDltuPk0G92b5QAy802kG7sqwBgwTGVkKsqve6 T2KLFU2FwyaTw== Date: Wed, 30 Nov 2022 13:08:22 -0800 From: "Darrick J. Wong" To: Dan Williams Cc: Shiyang Ruan , linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, nvdimm@lists.linux.dev, linux-fsdevel@vger.kernel.org, david@fromorbit.com, akpm@linux-foundation.org Subject: Re: [PATCH 0/2] fsdax,xfs: fix warning messages Message-ID: References: <1669301694-16-1-git-send-email-ruansy.fnst@fujitsu.com> <6386d512ce3fc_c9572944e@dwillia2-mobl3.amr.corp.intel.com.notmuch> <638700ba5db1_c95729435@dwillia2-mobl3.amr.corp.intel.com.notmuch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <638700ba5db1_c95729435@dwillia2-mobl3.amr.corp.intel.com.notmuch> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Tue, Nov 29, 2022 at 11:05:30PM -0800, Dan Williams wrote: > Darrick J. Wong wrote: > > On Tue, Nov 29, 2022 at 07:59:14PM -0800, Dan Williams wrote: > > > [ add Andrew ] > > > > > > Shiyang Ruan wrote: > > > > Many testcases failed in dax+reflink mode with warning message in dmesg. > > > > This also effects dax+noreflink mode if we run the test after a > > > > dax+reflink test. So, the most urgent thing is solving the warning > > > > messages. > > > > > > > > Patch 1 fixes some mistakes and adds handling of CoW cases not > > > > previously considered (srcmap is HOLE or UNWRITTEN). > > > > Patch 2 adds the implementation of unshare for fsdax. > > > > > > > > With these fixes, most warning messages in dax_associate_entry() are > > > > gone. But honestly, generic/388 will randomly failed with the warning. > > > > The case shutdown the xfs when fsstress is running, and do it for many > > > > times. I think the reason is that dax pages in use are not able to be > > > > invalidated in time when fs is shutdown. The next time dax page to be > > > > associated, it still remains the mapping value set last time. I'll keep > > > > on solving it. > > > > > > > > The warning message in dax_writeback_one() can also be fixed because of > > > > the dax unshare. > > > > > > Thank you for digging in on this, I had been pinned down on CXL tasks > > > and worried that we would need to mark FS_DAX broken for a cycle, so > > > this is timely. > > > > > > My only concern is that these patches look to have significant collisions with > > > the fsdax page reference counting reworks pending in linux-next. Although, > > > those are still sitting in mm-unstable: > > > > > > http://lore.kernel.org/r/20221108162059.2ee440d5244657c4f16bdca0@linux-foundation.org > > > > > > My preference would be to move ahead with both in which case I can help > > > rebase these fixes on top. In that scenario everything would go through > > > Andrew. > > > > > > However, if we are getting too late in the cycle for that path I think > > > these dax-fixes take precedence, and one more cycle to let the page > > > reference count reworks sit is ok. > > > > Well now that raises some interesting questions -- dax and reflink are > > totally broken on 6.1. I was thinking about cramming them into 6.2 as a > > data corruption fix on the grounds that is not an acceptable state of > > affairs. > > I agree it's not an acceptable state of affairs, but for 6.1 the answer > may be to just revert to dax+reflink being forbidden again. The fact > that no end user has noticed is probably a good sign that we can disable > that without any one screaming. That may be the easy answer for 6.2 as > well given how late this all is. > > > OTOH we're past -rc7, which is **really late** to be changing core code. > > Then again, there aren't so many fsdax users and nobody's complained > > about 6.0/6.1 being busted, so perhaps the risk of regression isn't so > > bad? Then again, that could be a sign that this could wait, if you and > > Andrew are really eager to merge the reworks. > > The page reference counting has also been languishing for a long time. A > 6.2 merge would be nice, it relieves maintenance burden, but they do not > start to have real end user implications until CXL memory hotplug > platforms arrive and the warts in the reference counting start to show > real problems in production. Hm. How bad *would* it be to rebase that patchset atop this one? After overnight testing on -rc7 it looks like Ruan's patchset fixes all the problems AFAICT. Most of the remaining regressions are to mask off fragmentation testing because fsdax cow (like the directio write paths) doesn't make much use of extent size hints. > > Just looking at the stuff that's still broken with dax+reflink -- I > > noticed that xfs/550-552 (aka the dax poison tests) are still regressing > > on reflink filesystems. > > That's worrying because the whole point of reworking dax, xfs, and > mm/memory-failure all at once was to handle the collision of poison and > reflink'd dax files. I just tried out -rc7 and all three pass, so disregard this please. > > So, uh, what would this patchset need to change if the "fsdax page > > reference counting reworks" were applied? Would it be changing the page > > refcount instead of stashing that in page->index? > > Nah, it's things like switching from pages to folios and shifting how > dax goes from pfns to pages. > > https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?h=mm-unstable&id=cca48ba3196 > > Ideally fsdax would never deal in pfns at all and do everything in terms > of offsets relative to a 'struct dax_device'. > > My gut is saying these patches, the refcount reworks, and the > dax+reflink fixes, are important but not end user critical. One more > status quo release does not hurt, and we can circle back to get this all > straightened early in v6.3. Being a data corruption fix, I don't see why we shouldn't revisit this during the 6.2 cycle, even if it comes after merging the refcounting stuff. Question for Ruan: Would it be terribly difficult to push out a v2 with the review comments applied so that we have something we can backport to 6.1; and then rebase the series atop 6.2-rc1 so we can apply it to upstream (and then apply the 6.1 version to the LTS)? Or is this too convoluted...? > I.e. just revert: > > 35fcd75af3ed xfs: fail dax mount if reflink is enabled on a partition > > ...for v6.1-rc8 and get back to this early in the New Year. Hm. Tempting. --D > > > > --D > > > > > > Shiyang Ruan (2): > > > > fsdax,xfs: fix warning messages at dax_[dis]associate_entry() > > > > fsdax,xfs: port unshare to fsdax > > > > > > > > fs/dax.c | 166 ++++++++++++++++++++++++++++++------------- > > > > fs/xfs/xfs_iomap.c | 6 +- > > > > fs/xfs/xfs_reflink.c | 8 ++- > > > > include/linux/dax.h | 2 + > > > > 4 files changed, 129 insertions(+), 53 deletions(-) > > > > > > > > -- > > > > 2.38.1 > >