From patchwork Tue Apr 16 16:41:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goldwyn Rodrigues X-Patchwork-Id: 10903437 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 304A618FD for ; Tue, 16 Apr 2019 16:42:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FF9A2898D for ; Tue, 16 Apr 2019 16:42:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E4CC289E8; Tue, 16 Apr 2019 16:42:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB67C2898D for ; Tue, 16 Apr 2019 16:42:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727052AbfDPQmI (ORCPT ); Tue, 16 Apr 2019 12:42:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:36100 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726816AbfDPQmI (ORCPT ); Tue, 16 Apr 2019 12:42:08 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 4CF57AF1B; Tue, 16 Apr 2019 16:42:07 +0000 (UTC) From: Goldwyn Rodrigues To: linux-btrfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, jack@suse.cz, david@fromorbit.com, willy@infradead.org, hch@lst.de, darrick.wong@oracle.com, kilobyte@angband.pl, dsterba@suse.cz, nborisov@suse.com, linux-nvdimm@lists.01.org Subject: [PATCH v3 00/18] btrfs dax support Date: Tue, 16 Apr 2019 11:41:36 -0500 Message-Id: <20190416164154.30390-1-rgoldwyn@suse.de> X-Mailer: git-send-email 2.16.4 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch set adds support for dax on the BTRFS filesystem. In order to support for CoW for btrfs, there were changes which had to be made to the dax handling. The important one is copying blocks into the same dax device before using them which is performed by iomap type IOMAP_DAX_COW. Snapshotting and CoW features are supported (including mmap preservation across snapshots). Git: https://github.com/goldwynr/linux/tree/btrfs-dax Changes since v2: - Created a new type IOMAP_DAX_COW as opposed to flag IOMAP_F_COW - CoW source address is presented in iomap.inline_data - Split the patches to more elaborate dax/iomap patches Changes since v1: - use iomap instead of redoing everything in btrfs - support for mmap writeprotecting on snapshotting fs/btrfs/Makefile | 1 fs/btrfs/ctree.h | 38 +++++ fs/btrfs/dax.c | 288 +++++++++++++++++++++++++++++++++++++++++-- fs/btrfs/disk-io.c | 4 fs/btrfs/file.c | 37 ++++- fs/btrfs/inode.c | 114 ++++++++++++----- fs/btrfs/ioctl.c | 29 +++- fs/btrfs/send.c | 4 fs/btrfs/super.c | 30 ++++ fs/dax.c | 152 ++++++++++++++++++++-- fs/iomap.c | 9 - fs/ocfs2/file.c | 2 fs/read_write.c | 10 - fs/xfs/xfs_reflink.c | 2 include/linux/dax.h | 13 + include/linux/fs.h | 7 - include/linux/iomap.h | 7 + include/trace/events/btrfs.h | 56 ++++++++ 18 files changed, 717 insertions(+), 86 deletions(-)