linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* why check f_path.mnt is equal for source and dest in btrfs_ioctl_clone()?
@ 2013-06-30  7:55 Stefan Paletta
  2013-07-01 16:21 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Paletta @ 2013-06-30  7:55 UTC (permalink / raw)
  To: linux-btrfs

This gives EXDEV for clone operations that btrfs could otherwise execute 
and with slight change of circumstances will actually execute fine.

Imagine we have a btrfs on /dev/mapper/foobar with subvols /foo and 
/bar. Let’s also imagine top of said fs in mounted at /mnt. In this 
case, a cross-subvol clone of /mnt/foo/srcfile to /mnt/bar/dstfile will 
succeed.

However, if only the individual subvols were mounted like this:
	/dev/mapper/foobar on /mnt (subvol=foo)
	/dev/mapper/foobar on /mnt2 (subvol=bar),
then a clone of /mnt/srcfile to /mnt2/dstfile will fail with EXDEV even 
though it is otherwise equal to the former clone operation.

Would anyone care to shed some light on this? Is it due to legacy 
policy? Am I missing something?

Thanks
–Stefan


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-01 16:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-30  7:55 why check f_path.mnt is equal for source and dest in btrfs_ioctl_clone()? Stefan Paletta
2013-07-01 16:21 ` David Sterba

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).