linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Viro <viro@math.psu.edu>
To: Richard Gooch <rgooch@ras.ucalgary.ca>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] one of $BIGNUM devfs races
Date: Tue, 7 Aug 2001 15:10:23 -0400 (EDT)	[thread overview]
Message-ID: <Pine.GSO.4.21.0108071457010.18565-100000@weyl.math.psu.edu> (raw)
In-Reply-To: <200108071855.f77Itl207144@vindaloo.ras.ucalgary.ca>



On Tue, 7 Aug 2001, Richard Gooch wrote:

> Hm. strace suggests my pwd is walking up the path. But WTF would it
> break? 2.4.7 was fine. What did I break?

Walking the path works so:

open ..
read it, entry by entry
find an entry that would have inode number equal to that of our directory.
We had found the last component of our name. Lather, rinse, repeat.

It relies on numbers from stat() and numbers from readdir() being
in sync.  It's not true on so many filesystems that this algorithm
is laughable.  Anything with synthetic inode numbers breaks it.

IOW, your pwd(1) behaviour is b0rken. Aside of being unable to work on a
lot of filesystems, it's doing a lot of extra work even on the filesystems
where it happens to work.

Check what your getcwd(3) is doing. It should at least try to call
getcwd(2) before reverting to that horror. Notice that you need
to walk the path only on 2.0 - 2.2 and above have a syscall that
works without any IO and regardless of the inumber assignment policy.


  reply	other threads:[~2001-08-07 19:10 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-06 11:58 [PATCH] one of $BIGNUM devfs races Alexander Viro
2001-08-06 16:47 ` Richard Gooch
2001-08-06 16:56   ` Rik van Riel
2001-08-06 17:11   ` Richard Gooch
2001-08-06 23:50 ` Richard Gooch
2001-08-07  0:34   ` Alexander Viro
2001-08-07  0:51   ` Richard Gooch
2001-08-07  1:10     ` Alexander Viro
2001-08-07  1:27     ` Richard Gooch
2001-08-07  1:42       ` Alexander Viro
2001-08-07  2:00       ` Richard Gooch
2001-08-07  2:15         ` Alexander Viro
2001-08-07  5:17         ` Richard Gooch
2001-08-07  5:28           ` Alexander Viro
2001-08-07 10:21           ` Anton Altaparmakov
2001-08-07 17:09           ` Richard Gooch
2001-08-07 17:27             ` Arjan van de Ven
2001-08-07 17:28             ` Richard Gooch
2001-08-07  5:53       ` Richard Gooch
2001-08-07  6:23         ` Alexander Viro
2001-08-07  6:36         ` Richard Gooch
2001-08-07  6:40           ` Alexander Viro
2001-08-07  6:47           ` Richard Gooch
2001-08-07  7:31             ` Alexander Viro
2001-08-07 18:11             ` Richard Gooch
2001-08-07 18:23               ` Alexander Viro
2001-08-07 18:55               ` Richard Gooch
2001-08-07 19:10                 ` Alexander Viro [this message]
2001-08-07 22:13                 ` Richard Gooch
2001-08-06 23:59 Alan Cox
     [not found] ` <no.id>
2001-08-06 23:54   ` Alan Cox
2001-08-06 23:55   ` Richard Gooch
2001-08-06 23:59   ` Richard Gooch
2001-08-07 16:22   ` Alan Cox
2001-08-07 19:04   ` Alan Cox
2001-08-07 19:16     ` Alexander Viro
2001-08-08 21:16       ` H. Peter Anvin
2001-08-08 21:47         ` Alexander Viro
2001-08-08 23:29         ` Richard Gooch
2001-08-07 19:09   ` Richard Gooch
2001-08-07 19:20     ` Alexander Viro

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=Pine.GSO.4.21.0108071457010.18565-100000@weyl.math.psu.edu \
    --to=viro@math.psu.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rgooch@ras.ucalgary.ca \
    /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).