Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp260668pxf; Wed, 10 Mar 2021 05:57:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxanEM8n1MPUxK5SAEv+gv48GQhJna2bhzAkD0x4C313OJHtf9J6ysfWJhFiW3g/8Wkkjy X-Received: by 2002:a17:907:1692:: with SMTP id hc18mr3773160ejc.265.1615384650664; Wed, 10 Mar 2021 05:57:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615384650; cv=none; d=google.com; s=arc-20160816; b=jb2vreZl+dVahrR3kIxCAPkOekCHIVrlZERrGRORdjsArzqi4ZreAsaZCXciYgXEld PElwPRc5rDvbJn+oHY1wxfa3JlfCRElA2qut6JoLdywHcxTgxD2b/oXWx9u86FR70Uva CYUinlkzTJ/4CK4x72QRUYWqrKbNhvqOZT+b3jMVjjpighjNxgK9rrMmCtuHvlHFGnKz uqF018+x3gALKfifERmAN0rhNtVKoiyagyrPvM5V6bbp+toTaJdnnLg2neCfwBHtC/gj q+9BOLvwn5bI/J7Knm+e3zno+6J/sjaaTs/TDRxjcm1zGFJ0o9oieQLYOfN0lcoHR58X /Ujw== 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=ASkeCYNO3dhrSyJuXDJUBfebpEQzrlHM2DpTFAkPLVI=; b=j4FzZdHeGA1dDq/aX9MfFaSAOO2G5QIJnORCjh3cEC734qxGxTQx3wAdsgDnYm9ira 6uBqTql6OX/n5HqQfMZ+5Q+ZSYViiQHdEmVtzLvHfw/MBds+26XISuWttdhjOwTBZwuZ arKsVyATpTxnUWe9ReFWAgliH5CxgGFV6F8Fsx8xzyCh6JT8dS2qtUb6l+k2VoPwggfB 8D9jCMWzr+PUaWfvABcLW0DveY+5vo09NhSWNhoD+oLP1YHPQUUekMO9DrNMr/RgvERI 2Q5GGGFhNsc2bcKYkP/vqp/MtEMYsaTKJi5VVLA0Nl2pealI/qi9YJfwxWZEFlFguDx3 pCfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Tt7ayNXN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si11804847ejd.159.2021.03.10.05.57.07; Wed, 10 Mar 2021 05:57:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Tt7ayNXN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232849AbhCJNzn (ORCPT + 99 others); Wed, 10 Mar 2021 08:55:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232925AbhCJNzi (ORCPT ); Wed, 10 Mar 2021 08:55:38 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02C50C061760; Wed, 10 Mar 2021 05:55:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ASkeCYNO3dhrSyJuXDJUBfebpEQzrlHM2DpTFAkPLVI=; b=Tt7ayNXNWXK2bTVKrYTcEgnkh+ f1XcrJPHapkQa44CIKSbezQvxwWp57snh9ZQwPdTMAk8AB48/hoKyAYsV3ZU4LGI3DP+I6nECBWbe mY8h829FSnSMNv/PCAsrzVymOeG/qWx13tFKzswafFltkt9XHyX7vptRhmgxV+4sHHs8TT+u96GSL 4nlKgrcNvpOFZWyOF3okP7Uk5+XNkqMtBb7NgFccqDeLTOWWgoQL+VFa7b1Ix9secQvnL/Gs/rzb7 Aq26qRzbQFKc31DbCj6H7qdLZAgtko2Pd9+6RYYvXLu4N3eSeb9hz4Wf+6HZD9JmGcZZiCUZ26U0N zLJxPIow==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lJzJD-003a9C-NN; Wed, 10 Mar 2021 13:55:32 +0000 Date: Wed, 10 Mar 2021 13:55:31 +0000 From: Matthew Wilcox To: Neal Gompa Cc: Shiyang Ruan , linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-nvdimm@lists.01.org, linux-fsdevel , darrick.wong@oracle.com, dan.j.williams@intel.com, jack@suse.cz, viro@zeniv.linux.org.uk, Btrfs BTRFS , ocfs2-devel@oss.oracle.com, david@fromorbit.com, hch@lst.de, rgoldwyn@suse.de Subject: Re: [PATCH v2 00/10] fsdax,xfs: Add reflink&dedupe support for fsdax Message-ID: <20210310135531.GP3479805@casper.infradead.org> References: <20210226002030.653855-1-ruansy.fnst@fujitsu.com> <20210310130227.GN3479805@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 10, 2021 at 08:36:06AM -0500, Neal Gompa wrote: > On Wed, Mar 10, 2021 at 8:02 AM Matthew Wilcox wrote: > > > > On Wed, Mar 10, 2021 at 07:30:41AM -0500, Neal Gompa wrote: > > > Forgive my ignorance, but is there a reason why this isn't wired up to > > > Btrfs at the same time? It seems weird to me that adding a feature > > > > btrfs doesn't support DAX. only ext2, ext4, XFS and FUSE have DAX support. > > > > If you think about it, btrfs and DAX are diametrically opposite things. > > DAX is about giving raw access to the hardware. btrfs is about offering > > extra value (RAID, checksums, ...), none of which can be done if the > > filesystem isn't in the read/write path. > > > > That's why there's no DAX support in btrfs. If you want DAX, you have > > to give up all the features you like in btrfs. So you may as well use > > a different filesystem. > > So does that mean that DAX is incompatible with those filesystems when > layered on DM (e.g. through LVM)? Yes. It might be possible to work through RAID-0 or read-only through RAID-1, but I'm not sure anybody's bothered to do that work. > Also, based on what you're saying, that means that DAX'd resources > would not be able to use reflinks on XFS, right? That'd put it in > similar territory as swap files on Btrfs, I would think. You can use DAX with reflinks because the CPU can do read-only mmaps. On a write fault, we break the reflink, copy the data and put in a writable PTE.