From patchwork Thu Nov 24 14:54:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 13055078 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C6F7C43217 for ; Thu, 24 Nov 2022 14:55:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229875AbiKXOz0 (ORCPT ); Thu, 24 Nov 2022 09:55:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbiKXOzO (ORCPT ); Thu, 24 Nov 2022 09:55:14 -0500 Received: from mail1.bemta34.messagelabs.com (mail1.bemta34.messagelabs.com [195.245.231.2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 500A525E8B; Thu, 24 Nov 2022 06:55:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fujitsu.com; s=170520fj; t=1669301711; i=@fujitsu.com; bh=alQ7R5Jh0NErV3HrxzICAC/+0mUOPP9X/aFaPsHC9FA=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=FLsiwZGfCHP45lQpVpgj6eO4NpEeQgX9uPYR97QjHyJ5ijI+t2qWitMp4oPx8cWQ9 D7GNOe11wh9E4pAw5dMsmHAZe8FcbNfU9XQo/Cyn7+Fr6L8onY9A7+2xc5VmfTihua uhDeiNt52ackZGCTBCzl3iHQlpHJIZIkZWDknRUPVmzdCmyM3ykPmSLx+M103Egb9G SM6IBsbOxg5JDvO9RWJnGZhFyQU40Th3w7798NQRN6d2xfrLIQPawKhJDdkDDC0aq1 VknjI7wEnzfkG8QwmPSHJck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OesSUOFRNPZ2KTlSqZtG3IOLbB/EtsscE02gH1O+oWJ64sV68v/ZelzaKX/MJv2cG5WmxJLc UaioRZzUXEiAPCOJaKAAwAA X-Env-Sender: ruansy.fnst@fujitsu.com X-Msg-Ref: server-16.tower-565.messagelabs.com!1669301710!39516!1 X-Originating-IP: [62.60.8.98] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.101.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 16235 invoked from network); 24 Nov 2022 14:55:11 -0000 Received: from unknown (HELO n03ukasimr03.n03.fujitsu.local) (62.60.8.98) by server-16.tower-565.messagelabs.com with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 24 Nov 2022 14:55:11 -0000 Received: from n03ukasimr03.n03.fujitsu.local (localhost [127.0.0.1]) by n03ukasimr03.n03.fujitsu.local (Postfix) with ESMTP id C9C411AE; Thu, 24 Nov 2022 14:55:10 +0000 (GMT) Received: from R01UKEXCASM126.r01.fujitsu.local (R01UKEXCASM126 [10.183.43.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by n03ukasimr03.n03.fujitsu.local (Postfix) with ESMTPS id BE7F41AD; Thu, 24 Nov 2022 14:55:10 +0000 (GMT) Received: from localhost.localdomain (10.167.225.141) by R01UKEXCASM126.r01.fujitsu.local (10.183.43.178) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Thu, 24 Nov 2022 14:55:07 +0000 From: Shiyang Ruan To: , , , CC: , , Subject: [PATCH 0/2] fsdax,xfs: fix warning messages Date: Thu, 24 Nov 2022 14:54:52 +0000 Message-ID: <1669301694-16-1-git-send-email-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.167.225.141] X-ClientProxiedBy: G08CNEXCHPEKD07.g08.fujitsu.local (10.167.33.80) To R01UKEXCASM126.r01.fujitsu.local (10.183.43.178) X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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. 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(-)