From: Matthew Wilcox <willy@infradead.org>
To: Florian Margaine <florian@platform.sh>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs: allow do_renameat2() over bind mounts of the same filesystem.
Date: Sat, 29 Aug 2020 23:12:04 +0100 [thread overview]
Message-ID: <20200829221204.GV14765@casper.infradead.org> (raw)
In-Reply-To: <87wo1hf8o9.fsf@platform.sh>
On Sat, Aug 29, 2020 at 11:23:34PM +0200, Florian Margaine wrote:
> Al Viro <viro@zeniv.linux.org.uk> writes:
>
> > On Fri, Aug 28, 2020 at 10:40:35PM +0200, Florian Margaine wrote:
> >> There's currently this seemingly unnecessary limitation that rename()
> >> cannot work over bind mounts of the same filesystem,
> >
> > ... is absolutely deliberate - that's how you set a boundary in the
> > tree, preventing both links and renames across it.
>
> Sorry, I'm not not sure I understand what you're saying.
Al's saying this is the way an administrator can intentionally prevent
renames.
> /*
> * FICLONE/FICLONERANGE ioctls enforce that src and dest files are on
> * the same mount. Practically, they only need to be on the same file
> * system.
> */
> if (file_inode(file_in)->i_sb != file_inode(file_out)->i_sb)
> return -EXDEV;
clone doesn't change the contents of a file, merely how they're laid out
on storage. There's no particular reason for an administrator to
prohibit clone across mount points.
next prev parent reply other threads:[~2020-08-29 22:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-28 20:40 [PATCH] fs: allow do_renameat2() over bind mounts of the same filesystem Florian Margaine
2020-08-28 21:34 ` Al Viro
2020-08-29 21:23 ` Florian Margaine
2020-08-29 22:12 ` Matthew Wilcox [this message]
2020-08-29 22:42 ` Florian Margaine
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=20200829221204.GV14765@casper.infradead.org \
--to=willy@infradead.org \
--cc=florian@platform.sh \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).