linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "NeilBrown" <neilb@suse.de>
To: "Wang Yugui" <wangyugui@e16-tech.com>
Cc: "Josef Bacik" <josef@toxicpanda.com>,
	viro@ZenIV.linux.org.uk, linux-fsdevel@vger.kernel.org,
	linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] fs: allow cross-vfsmount reflink/dedupe
Date: Tue, 22 Feb 2022 08:59:41 +1100	[thread overview]
Message-ID: <164548078112.17923.854375583220948734@noble.neil.brown.name> (raw)
In-Reply-To: <20220217145422.C7EC.409509F4@e16-tech.com>

On Thu, 17 Feb 2022, Wang Yugui wrote:
> Hi,
> 
> > On Thu, 17 Feb 2022, Wang Yugui wrote:
> > > Hi,
> > > Cc: NeilBrown
> > > 
> > > btrfs cross-vfsmount reflink works well now with these 2 patches.
> > > 
> > > [PATCH] fs: allow cross-vfsmount reflink/dedupe
> > > [PATCH] btrfs: remove the cross file system checks from remap
> > > 
> > > But nfs over btrfs still fail to do cross-vfsmount reflink.
> > > need some patch for nfs too?
> > 
> > NFS doesn't support reflinks at all, does it?
> 
> NFS support reflinks now.
> 
> # df -h /ssd
> Filesystem              Type  Size  Used Avail Use% Mounted on
> T640:/ssd               nfs4   17T  5.5T   12T  34% /ssd
> # /bin/cp --reflink=always /ssd/1.txt /ssd/2.txt
> # uname -a
> Linux T7610 5.15.24-3.el7.x86_64 #1 SMP Thu Feb 17 12:13:25 CST 2022 x86_64 x86_64 x86_64 GNU/Linux
> 

So it does ..... ahhh, the CLONE command in NFSv4.2.....
This is used by the .remap_file_range file operation.  That operation
only gets called when the "from" and "to" files have the same
superblock.
btrfs has an ....  interesting concept of filesystem identity.  While
different "subvols" have the same superblock locally, when they are
exported over NFS they appear to be different filesystems and so have
different superblocks.  This is in part because btrfs cannot create
properly unique inode numbers across the whole filesystem.
Until btrfs sorts itself out, it will not be able to work with NFS
properly.

NeilBrown

  reply	other threads:[~2022-02-21 21:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-16 20:21 [PATCH] fs: allow cross-vfsmount reflink/dedupe Josef Bacik
2022-02-17  3:05 ` Darrick J. Wong
2022-02-17  4:52 ` Wang Yugui
2022-02-17  4:59   ` NeilBrown
2022-02-17  6:54     ` Wang Yugui
2022-02-21 21:59       ` NeilBrown [this message]
2022-02-21 23:53         ` NeilBrown
2022-02-22  1:56           ` Wang Yugui
2022-02-18 13:19 ` David Sterba
2022-02-18 13:22 ` Nikolay Borisov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=164548078112.17923.854375583220948734@noble.neil.brown.name \
    --to=neilb@suse.de \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    --cc=wangyugui@e16-tech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).