linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
	Chuck Lever <chuck.lever@oracle.com>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] VFS: fix recent breakage of FS_REVAL_DOT
Date: Wed, 26 May 2010 12:52:27 +1000	[thread overview]
Message-ID: <20100526125227.51b34f4f@notabene.brown> (raw)
In-Reply-To: <20100525015822.GV31073@ZenIV.linux.org.uk>

On Tue, 25 May 2010 02:58:22 +0100
Al Viro <viro@ZenIV.linux.org.uk> wrote:

> On Tue, May 25, 2010 at 11:14:05AM +1000, Neil Brown wrote:
> 
> > I must confess though that I don't feel I understand VFS name lookup properly
> > any more.  Since intents were added it seems to have become much more obscure
> > and complex.  I cannot help thinking that there must be a better way:
> > distinguish between the various cases at a higher level so we don't need as
> > many flags being passed around and interpreted by widely separate pieces of
> > code.  I don't have a concrete proposal but I would certainly be interested
> > to work on one if there were any hope of real change.
> > Thoughts?
> 
> Intents are vile crap that has been introduced by the nfs folks to start
> with...  I've been trying to localize the mess and it's got a _lot_ better
> than it used to be a year ago, but they are still not gone.  And yes, I
> plan to kill that crap.  Basically, most of the do_last() guts will become
> a method that would get struct file *explicitly* and ask the fs to do
> (possibly atomic) open.  With normal filesystems defaulting to what's there
> right now.

That sounds like the sort of direction I was imagining.  
I note however that vfat uses intents in a way that would not be addressed by
a '->do_last' method.  It wants to invalidate negative dentries in
d_revalidate if they are the target of a rename (or another create), and
presumably rename wouldn't use ->do_last?  Or maybe it would, but with a NULL
file ??

> 
> The main obstacle at the moment is in ->d_revalidate() abuses.  NFS, CIFS
> *and* autofs, the last one in a way that isn't really compatible with what
> NFS et.al. are trying to do.  Overloading of ->d_revalidate() and ->lookup()
> to do the work of open() doesn't help, and the horrors nfs4 piles on top
> of that are even scarier.
> 
> _Another_ fine piece of something is ->follow_link() abuses, including
> referrals' treatment.  Also tied to the previous messes.
> 
> We definitely will need to get VFS-to-fs APIs in that area changed; most of
> the mess has been created by the deeply misguided efforts to keep the API
> changes minimal.
> 
> As for the flags, quite a few will be gone once we split "opening the final
> component" from the normal cases.  Google for lookup_instantiate_filp+shit
> for details of these plans...

I tried cloning
   git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6.git
and couldn't find anything in the 'untested' branch.  Did I look in the wrong
place? Is there some work-in-progress I can explore?

Thanks,
NeilBrown


      reply	other threads:[~2010-05-26  2:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-24  6:57 [PATCH] VFS: fix recent breakage of FS_REVAL_DOT Neil Brown
2010-05-24 11:59 ` Al Viro
2010-05-24 15:50   ` Al Viro
2010-05-24 16:21     ` Trond Myklebust
2010-05-24 16:47       ` Al Viro
2010-05-24 17:06         ` Trond Myklebust
2010-05-24 19:08           ` Al Viro
2010-05-24 21:13             ` Trond Myklebust
2010-05-24 23:01               ` Al Viro
2010-05-24 23:44                 ` Al Viro
2010-05-25 13:04                   ` Trond Myklebust
2010-05-25 12:57                 ` Trond Myklebust
2010-05-25  1:35         ` Neil Brown
2010-05-25  1:14   ` Neil Brown
2010-05-25  1:58     ` Al Viro
2010-05-26  2:52       ` Neil Brown [this message]

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=20100526125227.51b34f4f@notabene.brown \
    --to=neilb@suse.de \
    --cc=chuck.lever@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    --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).