Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5879577ybi; Wed, 31 Jul 2019 04:50:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9tgheeqAF2giPma6mN4N8Ir04hKmv//bF0SW6eWsrSBPR3ZdcYet/5k1Gdoj1tJVCePeE X-Received: by 2002:a62:8f91:: with SMTP id n139mr6212673pfd.48.1564573837510; Wed, 31 Jul 2019 04:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564573837; cv=none; d=google.com; s=arc-20160816; b=Ifv7A23MI0CWjOzWcuCYx1Ty7YYOsdBKENRBIHuT6liQUvE0Ve3UCQZpZMsE82RCe1 DlN+w2+UwQUhH3ZZBJVCywHp1W6h+a8pv0EsbMSWRuCN5uhbTky6IzDUqBAdB3NmnkSJ tYrACTc81tMi5sTy+nkHdFgDx0qFc+v3mYqzk4IZh0OhCdjdg5IT+RFWcgpcVtB102bS /eKL16OQ1PG0RuPO3zJhsDTHvrrZfgCjjnbddlj4leO7p+Cj+1xz+bIhxLn96Y2V3qjD 44UScnK4oUvRSSzDgYGsxlrslkEj/dX7yNRY4R7WqDk2zUNLlQj0L07kxz22gYlcQOxN Vp3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=3osbMuq8d7FG0JbVgjeVtRCai6859AZrSeOSfyLJDX8=; b=f9MC2UARsEAl9PJHsGCRJCz17xnHNWJvEzvta5YjyQyhhiTHlTD42KYSn+54nk2UDN lot7SaNjSjb/T+ye1ri6zYrwtoRCl3jDWviDmzTAj7KFmltRtrr7HwiFFNKBrBtyABqI cveeO39zvGFt5QcBd5JwXm7zg/BGcNVs7AD9kB9JpQ7vtiSq0iMUeygHN1mP/FlfgemC mbKIGrv/Bh/31jBi5ZW5CTm7OdcodDV6jSFA40In22qGEPe3fg+abNpMCyM2JoyM/ky3 tGtSKxayEcLqzrXTDejCJp3my7GMlrv9T0pgn1xyrulj6/GXgIgsPVSzqRiUAu+8KcXc NbwA== 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 6si4416579pgb.201.2019.07.31.04.50.22; Wed, 31 Jul 2019 04:50:37 -0700 (PDT) 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 S1727267AbfGaLtt (ORCPT + 99 others); Wed, 31 Jul 2019 07:49:49 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:55517 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726232AbfGaLtt (ORCPT ); Wed, 31 Jul 2019 07:49:49 -0400 X-IronPort-AV: E=Sophos;i="5.64,330,1559491200"; d="scan'208";a="72591477" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 31 Jul 2019 19:49:45 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id B85DD4B4041E; Wed, 31 Jul 2019 19:49:42 +0800 (CST) Received: from iridescent.g08.fujitsu.local (10.167.225.140) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 31 Jul 2019 19:49:49 +0800 From: Shiyang Ruan To: , , CC: , , , , , , Subject: [RFC PATCH 0/7] xfs: add reflink & dedupe support for fsdax. Date: Wed, 31 Jul 2019 19:49:28 +0800 Message-ID: <20190731114935.11030-1-ruansy.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.167.225.140] X-yoursite-MailScanner-ID: B85DD4B4041E.A6D27 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 This patchset aims to take care of this issue to make reflink and dedupe work correctly in XFS. It is based on Goldwyn's patchsets: "v4 Btrfs dax support" and "Btrfs iomap". I picked up 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. For XFS: 1. report the source address and set IOMAP_COW type for those write operations that need COW. 2. update extent list at the end. 3. add file contents comparison function based on dax framework. 4. use xfs_break_layouts() 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: Add COW handle for fsdax. xfs: Add dedupe support for fsdax. fs/btrfs/ioctl.c | 11 ++- fs/dax.c | 203 ++++++++++++++++++++++++++++++++++++++---- fs/iomap.c | 9 +- fs/ocfs2/file.c | 2 +- fs/read_write.c | 11 +-- fs/xfs/xfs_iomap.c | 42 +++++---- fs/xfs/xfs_reflink.c | 84 +++++++++-------- include/linux/dax.h | 15 ++-- include/linux/fs.h | 8 +- include/linux/iomap.h | 6 ++ 10 files changed, 294 insertions(+), 97 deletions(-) -- 2.17.0