Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1885662ybx; Thu, 7 Nov 2019 19:12:30 -0800 (PST) X-Google-Smtp-Source: APXvYqzdV1qdiaMWmHx+4XqxYzU1C2/r9cC7uz6ssJQXU4vQhnoVXCqBWs1c3ZOtcSVWY1XZb85m X-Received: by 2002:a05:6402:38e:: with SMTP id o14mr1638855edv.285.1573182750707; Thu, 07 Nov 2019 19:12:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573182750; cv=none; d=google.com; s=arc-20160816; b=rWb8RHElrIP1XuMv1neVBTFGlfxqnEaj5iAxt9cjD+nKxnrmbdllCUVcCVCshkNEDW E8zuRzYu2rsbvghUL1UBkH4MTwsj7o6oHKsImiQQw7gpAF+6e4+8X6b+Z0LH3Lawed2X Q+jT9/NqegQrMGDkfBWXH2fLYA7DLq5kdohU8GQm3NS7wm4TKuvQYVeWHeT6DsJqqg/F AidOGgB2o5QZoxL9255tsE2klrLVrxFXxSD0M/bqhSUu6FtycY9wiraMODu5O0PYwlUn FrdWRIz+71tHDDZ2vmhRr6++QIjc5rzyTSxZ7hBuwdAD21q5HtuehGA0pVsSjtSu24VH 5GOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=3dV1D5Bzm+SgeyPwmGTJkAGwAkoopqOiPL3psSXgaPw=; b=Ykkra1y9G8VQjqZq27HlYb52aCfnkkAisuABghx0XmxyZw1zHBxrDT3tqrBruE7Kqc esBCHY3AMiC3p4H260RKGg4g5TBaAZ/rnNXaJATp5kBp5+2XRvYlJNKMZrgE8daYonfK jFONO5PhrZD7G7MiBFX2hmuGDhneQED3XTZpELgRbfJnK1pigJ4oFALa41opuUQNQaIi 2FFaFqgROKpe0bhNAa9uzMAGuz9C5DbSPD5/r6/qy2dzQaXBPwIIrO7zc+TlcaGuZc4H rTaTqVyAUDYyMbCVKB7+9eQ9uOaOb4v4F2UgZ+TX7ug6KS43wvYwthwJsMXW2vAMdhC9 J1oA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k43si3231257edb.150.2019.11.07.19.12.07; Thu, 07 Nov 2019 19:12:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729075AbfKHDLR (ORCPT + 99 others); Thu, 7 Nov 2019 22:11:17 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:6644 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725930AbfKHDLQ (ORCPT ); Thu, 7 Nov 2019 22:11:16 -0500 X-IronPort-AV: E=Sophos;i="5.68,280,1569254400"; d="scan'208";a="78040346" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 08 Nov 2019 11:10:57 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id A9B984B6AE15; Fri, 8 Nov 2019 11:02:52 +0800 (CST) Received: from [10.167.225.140] (10.167.225.140) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 8 Nov 2019 11:11:05 +0800 Subject: Re: [RFC PATCH v2 0/7] xfs: reflink & dedupe for fsdax (read/write path). To: , , , , , CC: , , , References: <20191030041358.14450-1-ruansy.fnst@cn.fujitsu.com> From: Shiyang Ruan Message-ID: Date: Fri, 8 Nov 2019 11:10:56 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20191030041358.14450-1-ruansy.fnst@cn.fujitsu.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.225.140] X-yoursite-MailScanner-ID: A9B984B6AE15.AC5F9 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@cn.fujitsu.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Darrick, Dave, Do you have any comment on this? On 10/30/19 12:13 PM, Shiyang Ruan wrote: > This patchset aims to take care of this issue to make reflink and dedupe > work correctly (actually in read/write path, there still has some problems, > such as the page->mapping and page->index issue, in mmap path) in XFS under > fsdax mode. > > It is based on Goldwyn's patchsets: "v4 Btrfs dax support" and the latest > iomap. I borrowed some patches related and made a few fix to make it > basically works fine. > > For dax framework: > 1. adapt to the latest change in iomap (two iomaps). > > For XFS: > 1. distinguish dax write/zero from normal write/zero. > 2. remap extents after COW. > 3. add file contents comparison function based on dax framework. > 4. use xfs_break_layouts() instead of break_layout to support dax. > > > Goldwyn Rodrigues (3): > dax: replace mmap entry in case of CoW > fs: dedup file range to use a compare function > dax: memcpy before zeroing range > > Shiyang Ruan (4): > dax: Introduce dax_copy_edges() for COW. > dax: copy data before write. > xfs: handle copy-on-write in fsdax write() path. > xfs: support dedupe for fsdax. > > fs/btrfs/ioctl.c | 3 +- > fs/dax.c | 211 +++++++++++++++++++++++++++++++++++++---- > fs/iomap/buffered-io.c | 8 +- > fs/ocfs2/file.c | 2 +- > fs/read_write.c | 11 ++- > fs/xfs/xfs_bmap_util.c | 6 +- > fs/xfs/xfs_file.c | 10 +- > fs/xfs/xfs_iomap.c | 3 +- > fs/xfs/xfs_iops.c | 11 ++- > fs/xfs/xfs_reflink.c | 79 ++++++++------- > include/linux/dax.h | 16 ++-- > include/linux/fs.h | 9 +- > 12 files changed, 291 insertions(+), 78 deletions(-) > -- Thanks, Shiyang Ruan.