Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp13762171rwb; Sun, 27 Nov 2022 10:52:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf5TzN12fnFVZ+q2bpPIs1q8zLlomXTmuvalwJCPG0Ytf7/qENTVU0LFQ1ck/bee6lMK+1AO X-Received: by 2002:a17:906:fcd0:b0:7ad:b8c0:3057 with SMTP id qx16-20020a170906fcd000b007adb8c03057mr40965263ejb.440.1669575167334; Sun, 27 Nov 2022 10:52:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669575167; cv=none; d=google.com; s=arc-20160816; b=G2B4wfMFbIgQcZpxWI5HfzWT8MiHzd6oWaARY1XP/CMXURsomZty1S1szkQcMzVehO pMP0bykDZQH5Pzw9P6BiBzrUs3F9OPAngQkJg2S1pY7mEN04sxryDvQryMQKmJDR/tHx JaymInuloPS7Xf4hKdu7hsMeVrvICA98AgdLTxKAnjSu8Z9mUUoKehS8PvUjNwAN7PtH nSCyBWMEIgoAK5eFvddlg+MDm84U28wt9n2h+spmu1XehMmn3sCC+f2ywjoZydM+/RQy jxHBOiolKe8LZXPFZQcabibWqkuuqYdOhVftkzznXjuJYd8ph95XOTg5kJk6/8fMh05w twrA== 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=STPdRG0HqKblcAtEa2NHaJPvcu8NOY9oRfhazwTWUF4=; b=nxTre8s0Z/DKTx+dUvPfdX4G3aK3IqpqRSTHf76BbG/u3bz+uSze8ZETyB+c/ppYDv IK2xNwaGf95rE4yCcylHANdrEa5nBOnEF3il/vWcWRIrRVGkc1gW+ylcQwK4R+e+i2WT uu0HQlW0GN0+fBjLTZURR3Gg9BPEiUskJcTUPB8AU8txT8CeqoUdDqBpvWyNKdRhIog/ Y919uxQ0zMYdeybC30qCbJrfouvRK5rA4BLcQY4Tmm+q8D7yBkM3ZV9nM7XHgchdr9kf O98yMteKkS7tVh1NbIrQcSMnvSLec7sjpwhAh7TqCjy6Gmw3jvMD5M9MkOHgN0Yh4/rF ludQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bov49eJq; 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 xi7-20020a170906dac700b0078dcd448f99si9168974ejb.855.2022.11.27.10.52.26; Sun, 27 Nov 2022 10:52:47 -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=bov49eJq; 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 S229650AbiK0Si1 (ORCPT + 85 others); Sun, 27 Nov 2022 13:38:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbiK0SiY (ORCPT ); Sun, 27 Nov 2022 13:38:24 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88465A188; Sun, 27 Nov 2022 10:38:23 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 18C6660E8B; Sun, 27 Nov 2022 18:38:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DFA7C433D6; Sun, 27 Nov 2022 18:38:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669574302; bh=CYMIjb5gAdEwblJqPgCeMG3YnIc+UiEUP69wjHO+80o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bov49eJquLLRRRmcovLLKyCn5XGNT4v6cAjKYpQeQMZN6QS1FOZ1GCvIQ4K79Qc7u rNph3AH9GRBVKGwSGBgmE3ypDFS4+QeCbhVnPS/gUaNXsEq9JJSVJQEznZFZGFvLwR r2xvCv6vlXRWkySZ9ooh2kQyfyKmLYpvhb2o+UKJ3QE7xHJTfUvVkcqADvfLIuzDwL Ql5tAoI6h07U8YEjYN3luBlaUILwEbX71G+vqYFopLnu6mIHpOWResh1kuPIeOFul4 MUU37iC+ujd8UPRbojG4gYzl1e2aBp1AzXgkVQ5ALtOfMgsflHzN6GYNycH7iC3ez7 YMNtJD1azIKEQ== Date: Sun, 27 Nov 2022 10:38:22 -0800 From: "Darrick J. Wong" To: Shiyang Ruan Cc: linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, nvdimm@lists.linux.dev, linux-fsdevel@vger.kernel.org, david@fromorbit.com, dan.j.williams@intel.com Subject: Re: [PATCH 0/2] fsdax,xfs: fix warning messages Message-ID: References: <1669301694-16-1-git-send-email-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1669301694-16-1-git-send-email-ruansy.fnst@fujitsu.com> 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 Thu, Nov 24, 2022 at 02:54:52PM +0000, 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. This cuts down the amount of test failures quite a bit, but I think you're still missing a piece or two -- namely the part that refuses to enable S_DAX mode on a reflinked file when the inode is being loaded from disk. However, thank you for fixing dax.c, because that was the part I couldn't figure out at all. :) --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 >