public inbox for linux-api@vger.kernel.org
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov-nWWhXC5lh1RBDgjK7y7TUQ@public.gmane.org>
To: Al Viro <viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kernel-team-b10kYP2dOMg@public.gmane.org,
	Linus Torvalds
	<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.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-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>

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-b10kYP2dOMg@public.gmane.org>
> > 
> > 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-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
> 
> and don't bring it back in that form.

-- 
Omar

  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
     [not found] ` <cover.1479802448.git.osandov-b10kYP2dOMg@public.gmane.org>
2016-11-22  8:25   ` [RFC PATCH 1/3] fs: add AT_REPLACE flag for linkat() which replaces the target Omar Sandoval
     [not found]     ` <6b3b7387538efd1a582fc34da2a15ae37cf59429.1479802448.git.osandov-b10kYP2dOMg@public.gmane.org>
2016-11-22 19:05       ` Colin Walters
2016-11-22  8:25   ` [RFC PATCH 2/3] vfs: add d_replace() Omar Sandoval
     [not found]     ` <527297d2dae27845b3b7ba8ad6e81ef477fddee2.1479802448.git.osandov-b10kYP2dOMg@public.gmane.org>
2016-11-23  3:40       ` Al Viro
     [not found]         ` <20161123034004.GK1555-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2016-11-23  3:57           ` Omar Sandoval [this message]
2016-11-23 16:29             ` Linus Torvalds
     [not found]               ` <CA+55aFxTQb5dFwziQ7uaHgew4xq6xKhYHpD1tGrZi9QvM6+SLw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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-nwwhxc5lh1rbdgjk7y7tuq@public.gmane.org \
    --cc=kernel-team-b10kYP2dOMg@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.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