From: Omar Sandoval <osandov@osandov.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org,
kernel-team@fb.com,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [RFC PATCH 2/3] vfs: add d_replace()
Date: Tue, 22 Nov 2016 19:57:16 -0800 [thread overview]
Message-ID: <20161123035716.GA29697@mew> (raw)
In-Reply-To: <20161123034004.GK1555@ZenIV.linux.org.uk>
On Wed, Nov 23, 2016 at 03:40:04AM +0000, Al Viro wrote:
> On Tue, Nov 22, 2016 at 12:25:02AM -0800, Omar Sandoval wrote:
> > From: Omar Sandoval <osandov@fb.com>
> >
> > Changes the inode associated with a dentry. This'll be useful for
> > implementations of linkat() AT_REPLACE.
>
> Hard NAK. That violates all kinds of assumptions made by VFS and
> filesystems alike; never, ever do that. If you have a reference to
> a positive dentry, inode should *NEVER* change.
Okay, thanks for the sanity check.
> If it unhashed the old dentry, created a new one and attached inode to
> it, it _might_ have a chance. I'm less than sure it's a good idea, but
> it this form it's a non-starter.
One thing I considered was having the filesystem unhash the dentry and
just letting the next lookup that comes along instantiate the new one.
Is that better or worse than doing something like your suggestion?
> Again,
>
> NAKed-by: Al Viro <viro@zeniv.linux.org.uk>
>
> and don't bring it back in that form.
--
Omar
next prev parent reply other threads:[~2016-11-23 3:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-22 8:25 [RFC PATCH 0/3] fs: add AT_REPLACE flag for linkat() Omar Sandoval
2016-11-22 8:25 ` [RFC PATCH 1/3] fs: add AT_REPLACE flag for linkat() which replaces the target Omar Sandoval
2016-11-22 19:05 ` Colin Walters
2016-11-22 8:25 ` [RFC PATCH 2/3] vfs: add d_replace() Omar Sandoval
2016-11-23 3:40 ` Al Viro
2016-11-23 3:57 ` Omar Sandoval [this message]
2016-11-23 16:29 ` Linus Torvalds
2016-12-02 1:10 ` Omar Sandoval
2016-11-22 8:25 ` [RFC PATCH 3/3] Btrfs: add support for linkat() AT_REPLACE Omar Sandoval
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=20161123035716.GA29697@mew \
--to=osandov@osandov.com \
--cc=kernel-team@fb.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=torvalds@linux-foundation.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).