Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp437697pxf; Wed, 10 Mar 2021 09:07:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwoySdg0uVpsFJfp5EVYxzr9VLv6kqS5Bmz57VLk46sRLlAzLClGNKEJ0/uO6GW+b+nUO0U X-Received: by 2002:aa7:cc94:: with SMTP id p20mr4479164edt.353.1615396053941; Wed, 10 Mar 2021 09:07:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615396053; cv=none; d=google.com; s=arc-20160816; b=BxyycA49tLlsesYvj+jlc3Cl0lR4b6G8NCxRj05N20HhbxBfwh+QfaPyYiP7mSqhK2 Gfxa4ycKfWdecYW6Lj3LN3GO3gRKqU0AMW5Ruf0dxdw5XL1/LsMa9M6nQEilDQmhfq9M OUSkKOmCZzrcxP4q7qWiK8xJOUFZeK5chCnJfFLl5IP0hXdjYJ/rQ+lnrR1COZhnfnWF 1Q+fTMpVHDiPwVf9ICT3AnhxzMyX6VKMwPtwxyI3gZkqoQBvp+Sxx72llk93Fwjzh/fw /uq+ec3e1SCvnIDeiFXRy5CVGBsxTfLmwXVOJ8j1CmVRyFI+tTzAvLiQTlyg9RLRLyo/ XV0A== 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; bh=EuW+j4j4tzGp39CD7DqxL6d3j3HjLn8KOI1rGYOP1So=; b=Wn+kgqSqpc/uJK9dclMM7Ylki1w7j/EzCh/tv3FsGuS/QgrH62shNFDwqg3bi40UIl N00PeaEjs+cIE0TLSMvdmYyNEzxGDB70Tt8mRCYZIWimJt8DTmdn0tJjmS78yBY4VXPj a2MZ9miqewT13FBL8X2Q57KSy5ftzQFrZwFYG1dZ511NsK4SLraTTc9sRkjOJTNljv5G kqiHYqxZLORwfT1lw59WsAC/LBI9QWr7tBTDu3/EjAnN3+0PXC29DjKwW05FP8UVOY5E 27XXkABbDE0b3pwWN8YLvalfQZYZiba5GR9rcvpV9B6Do6kw6MCAUUCqYjzc96PuNvha OaKw== ARC-Authentication-Results: i=1; mx.google.com; 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 o13si11762002ejn.226.2021.03.10.09.07.02; Wed, 10 Mar 2021 09:07:33 -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; 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 S233146AbhCJRE3 (ORCPT + 99 others); Wed, 10 Mar 2021 12:04:29 -0500 Received: from mx2.suse.de ([195.135.220.15]:56940 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232437AbhCJREG (ORCPT ); Wed, 10 Mar 2021 12:04:06 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 77CE3ABD7; Wed, 10 Mar 2021 17:04:04 +0000 (UTC) Date: Wed, 10 Mar 2021 11:04:23 -0600 From: Goldwyn Rodrigues To: Matthew Wilcox Cc: Neal Gompa , 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 Subject: Re: [PATCH v2 00/10] fsdax,xfs: Add reflink&dedupe support for fsdax Message-ID: <20210310170423.beagx4sowxpa25no@fiona> References: <20210226002030.653855-1-ruansy.fnst@fujitsu.com> <20210310130227.GN3479805@casper.infradead.org> <20210310142159.kudk7q2ogp4yqn36@fiona> <20210310142643.GQ3479805@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210310142643.GQ3479805@casper.infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14:26 10/03, Matthew Wilcox wrote: > On Wed, Mar 10, 2021 at 08:21:59AM -0600, Goldwyn Rodrigues wrote: > > On 13:02 10/03, 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. > > > > DAX on btrfs has been attempted[1]. Of course, we could not > > But why? A completeness fetish? I don't understand why you decided > to do this work. If only I had a penny every time I heard "why would you want to do that?" > > > have checksums or multi-device with it. However, got stuck on > > associating a shared extent on the same page mapping: basically the > > TODO above dax_associate_entry(). > > > > Shiyang has proposed a way to disassociate existing mapping, but I > > don't think that is the best solution. DAX for CoW will not work until > > we have a way of mapping a page to multiple inodes (page->mapping), > > which will convert a 1-N inode-page mapping to M-N inode-page mapping. > > If you're still thinking in terms of pages, you're doing DAX wrong. > DAX should work without a struct page. Not pages specifically, but mappings. fsdax needs the mappings during the page fault and it breaks in case both files fault on the same shared extent. For Reference: WARN_ON_ONCE(page->mapping && page->mapping != mapping) in dax_disassociate_entry(). -- Goldwyn