linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Paletta <stefanp@cabal1.net>
To: linux-btrfs@vger.kernel.org
Subject: why check f_path.mnt is equal for source and dest in btrfs_ioctl_clone()?
Date: Sun, 30 Jun 2013 09:55:26 +0200	[thread overview]
Message-ID: <kqoobm$jq4$1@ger.gmane.org> (raw)

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


             reply	other threads:[~2013-06-30  8:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-30  7:55 Stefan Paletta [this message]
2013-07-01 16:21 ` why check f_path.mnt is equal for source and dest in btrfs_ioctl_clone()? David Sterba

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='kqoobm$jq4$1@ger.gmane.org' \
    --to=stefanp@cabal1.net \
    --cc=linux-btrfs@vger.kernel.org \
    /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).