linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Jan Harkes <jaharkes@cs.cmu.edu>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
	linux-fsdevel@vger.kernel.org,
	Marcelo Tosatti <marcelo@conectiva.com.br>,
	alan@lxorguk.ukuu.org.uk, Alexander Viro <viro@math.psu.edu>
Subject: Re: [PATCH 2.4.19pre8][RFC] remove-NFS-close-to-open from VFS (was Re: [PATCHSET] 2.4.19-pre8-jp12)
Date: Fri, 18 Oct 2002 01:57:17 +0200	[thread overview]
Message-ID: <15791.20061.369962.893823@charged.uio.no> (raw)
In-Reply-To: <20021017221652.GA26692@ravel.coda.cs.cmu.edu>

>>>>> " " == Jan Harkes <jaharkes@cs.cmu.edu> writes:


    >> Which is the whole point of the patch. If you are trying to
    >> read or modify a directory that is invalid, you need to be
    >> notified of that.

     > Yes, by failing in real_lookup, not randomly crapping out with
     > ESTALE.

You are completely missing the point: open("."); never did call
'real_lookup', and POSIX compatibility say that it shouldn't (see
example below).

     > Sorry it should have been 'reverted, or fixed to actually
     > revalidate all entries on the cached tree leading up to '.' and
     > '..'.

No.

Client                         Server
------                         --------
cd foo
                               mv foo bar
open(".")

You are basically saying that you believe that the above scenario must
always fail and that the VFS should enforce a violation of POSIX
rules. The current code has the possibility to recover from the above
sort of thing: this will not be the case if you have to look up 'foo'
on the server in order to do open(".")

     > /**
     > * d_invalidate - invalidate a dentry
     > * @dentry: dentry to invalidate
     >  *
     > * Try to invalidate the dentry if it turns out to be
     > * possible. If there are other dentries that can be
     > * reached through this one we can't delete it and we
     > * return -EBUSY. On success we return 0.
     >  *
     > * no dcache lock.
     >  */

     > It's the missing 'd_put' that is the problem. The code should
     > probably look like all other places where d_invalidate is
     > called, i.e.

     >     if (!dentry->d_op->d_revalidate(dentry, flags)) {
     > - d_invalidate(dentry);
     > + if (!d_invalidate(dentry)) {
     > + dput(dentry);
     > + dentry = NULL;
     > + }
     > 	break;
     >     }

So? That's just because those lines usually lie just after a
cached_lookup(), which bumps the count. Read the code in question: it
is not leaking dentries.

Cheers,
  Trond

  reply	other threads:[~2002-10-17 23:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200205162142.AWF00051@netmail.netcologne.de>
     [not found] ` <E178TUb-0005Bh-00@the-village.bc.nu>
     [not found]   ` <20020517034357.GA18449@ravel.coda.cs.cmu.edu>
     [not found]     ` <Pine.LNX.4.44.0205161105520.5254-100000@alumno.inacap.cl>
2002-10-17 20:38       ` [PATCH 2.4.19pre8][RFC] remove-NFS-close-to-open from VFS (was Re: [PATCHSET] 2.4.19-pre8-jp12) Jan Harkes
2002-10-17 21:48         ` Trond Myklebust
2002-10-17 22:16           ` Jan Harkes
2002-10-17 23:57             ` Trond Myklebust [this message]
2002-10-18 16:49               ` Jan Harkes
2002-10-18 17:03                 ` Trond Myklebust
2002-10-18 17:12                   ` Jan Harkes
2002-10-18 17:41                     ` Trond Myklebust
2002-10-18 18:23                       ` Jan Harkes
2002-10-18 19:23                         ` Trond Myklebust
2002-10-21 17:07                           ` Jan Harkes

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=15791.20061.369962.893823@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jaharkes@cs.cmu.edu \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=viro@math.psu.edu \
    /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).