mbox series

[v2,0/2] fs: allow cross-vfsmount reflink/dedupe

Message ID cover.1645194730.git.josef@toxicpanda.com (mailing list archive)
Headers show
Series fs: allow cross-vfsmount reflink/dedupe | expand

Message

Josef Bacik Feb. 18, 2022, 2:38 p.m. UTC
Hello,

These patches allow for cross vfsmount reflink/dedupe for everybody and removes
the duplicate checks in btrfs so we can allow it as well.  This limitation seems
to have been copied around from the original implementation from btrfs, but
makes little sense as we just need to make sure both files are on the same super
block.

Btrfs usage across all the distro's I'm aware of regularly use the pattern of
mounting subvolumes for different areas of the file system, and so we need to
allow reflink to happen over vfsmount as a matter of practicality.  It makes no
sense to make cp --reflink=always not work if you are copying something from say
/var to /home if they're differently mounted subvolumes.

The only change since v1 has been adding the Reviewed-by's for the VFS patch,
and then adding an ASSERT() to the btrfs patch to make sure we catch any changes
to this path.

Al if you have no objections we can send this through the btrfs tree.  Thanks,

Josef

Josef Bacik (2):
  btrfs: remove the cross file system checks from remap
  fs: allow cross-vfsmount reflink/dedupe

 fs/btrfs/reflink.c | 4 +---
 fs/ioctl.c         | 4 ----
 fs/remap_range.c   | 7 +------
 3 files changed, 2 insertions(+), 13 deletions(-)