linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hristo Venev <hristo@venev.name>
To: Nikolay Borisov <nborisov@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: btrfs_clone_files and bind mounts
Date: Mon, 26 Feb 2018 12:01:33 +0000	[thread overview]
Message-ID: <1519646493.12248.7.camel@venev.name> (raw)
In-Reply-To: <2ce8eab1-8951-a1c7-d4fa-5f4f3201923d@suse.com>

[-- Attachment #1: Type: text/plain, Size: 1011 bytes --]

On Tue, 2018-02-20 at 18:41 +0200, Nikolay Borisov wrote:
> 
> On 20.02.2018 17:50, Hristo Venev wrote:
> > What is the problem with cloning files between different
> > (vfs)mounts of
> > the same filesystem?
> > 
> 
> The "problem" is not really a problem, but rather a well-imposed
> restriction:
> 
> From  http://man7.org/linux/man-pages/man2/ioctl_ficlonerange.2.html
> 
> "Both files must reside within the same filesystem."
> 
> And as a matter of fact this is enforced in the generic
> vfs_clone_file_range. Of course if we were to do this across
> filesystem
> then we'd have all the problems associated with not being able to
> ensure
> atomicity of operations.

My question was about doing this within the same filesystem. In my case
(and I think it's relatively common), subvolumes of the same filesystem
are mounted separately, and I can't think of a good reason why
FICLONERANGE can't be made to work (it works if the subvolumes are
accessed within the same mount point).

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-02-26 12:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20 15:50 btrfs_clone_files and bind mounts Hristo Venev
2018-02-20 16:41 ` Nikolay Borisov
2018-02-26 12:01   ` Hristo Venev [this message]
2018-02-26 13:01     ` Nikolay Borisov
2018-02-26 13:51       ` Amir Goldstein

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=1519646493.12248.7.camel@venev.name \
    --to=hristo@venev.name \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.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).