All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Banks <gnb@melbourne.sgi.com>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Nikita Danilov <Nikita@Namesys.COM>,
	linux kernel mailing list <linux-kernel@vger.kernel.org>,
	alexander viro <viro@parcelfarce.linux.theplanet.co.uk>,
	trond myklebust <trondmy@trondhjem.org>
Subject: Re: d_splice_alias() problem.
Date: Thu, 13 May 2004 17:15:04 +1000	[thread overview]
Message-ID: <40A32078.FA69C47C@melbourne.sgi.com> (raw)
In-Reply-To: 16547.3723.584971.907946@cse.unsw.edu.au

Neil Brown wrote:
> 
> > Of course I now have an issue with the misleading name ;-)
> 
> Maybe:   DCACHE_NOT_KNOWN_TO_BE_CONNECTED.
> Unfortunately the absence of the flags is stronger information that
> it's presence and that makes it hard to name...

;-)

> > What I'm wondering is, do we still need DCACHE_DISCONNECTED at all?
> > Perhaps the uses of it could be replaced with combinations of checks
> > of IS_ROOT() and (d == d->d_sb->s_root) ?
> 
> It is still needed.
> Suppose one thread creates a disconnected dentry, and then starts building
> the path from the bottom up.
> When it is half way up another request comes in for the same
> filehandle.  The same dentry is found.  It is now not IS_ROOT, but
> still DCACHE_DISCONNECTED.  Until it is fully connected the second
> request shouldn't proceed, and without the DCACHE_DISCONNECTED flag it
> is expensive to test for connected-ness.  !IS_ROOT certainly isn't
> enough.

Sure, IS_ROOT() only tells you whether a dentry is connected to its parent
and to tell if its connected to the fs root you need to traverse all the
parents.  But nfsd_acceptable() already does this to do permission checks
in the (default) subtree_check case.

So it seems that what the flag gives you is that when its absent and
nosubtree_check is in effect, you know you can short-circuit the connection
walk.  Fair enough.

Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.

      reply	other threads:[~2004-05-13  7:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-23 13:02 d_splice_alias() problem Nikita Danilov
2004-04-23 15:40 ` Andreas Dilger
2004-04-23 16:20   ` Nikita Danilov
2004-04-23 23:49 ` Andrew Morton
2004-04-26 12:45   ` Nikita Danilov
2004-04-30  4:54 ` Neil Brown
2004-04-30  7:50   ` Greg Banks
2004-04-30 13:28   ` Nikita Danilov
2004-05-03 23:46     ` Neil Brown
2004-05-03 12:02   ` Greg Banks
2004-05-03 23:28     ` Neil Brown
2004-05-04  0:05       ` Greg Banks
2004-05-04  7:00       ` Greg Banks
2004-05-04  9:46         ` viro
2004-05-04 10:21           ` Greg Banks
2004-05-05  0:11           ` Neil Brown
2004-05-10  3:03         ` Neil Brown
2004-05-10  4:50           ` Greg Banks
2004-05-10  3:27       ` Neil Brown
2004-05-10 11:28         ` Greg Banks
2004-05-13  5:58           ` Neil Brown
2004-05-13  7:15             ` Greg Banks [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=40A32078.FA69C47C@melbourne.sgi.com \
    --to=gnb@melbourne.sgi.com \
    --cc=Nikita@Namesys.COM \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    --cc=trondmy@trondhjem.org \
    --cc=viro@parcelfarce.linux.theplanet.co.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.