mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Harkes <jaharkes@cs.cmu.edu>
To: linux-kernel@vger.kernel.org
Cc: Jesper Juhl <juhl-lkml@dif.dk>, "H. Peter Anvin" <hpa@zytor.com>,
	Kyle Moffett <mrmacman_g4@mac.com>
Subject: Re: Squashfs without ./..
Date: Sat, 26 Mar 2005 23:05:18 -0500	[thread overview]
Message-ID: <20050327040518.GA12072@delft.aura.cs.cmu.edu> (raw)
In-Reply-To: <Pine.LNX.4.62.0503251444060.2498@dragon.hyggekrogen.localhost>

On Fri, Mar 25, 2005 at 02:59:14PM +0100, Jesper Juhl wrote:
> On Thu, 24 Mar 2005, H. Peter Anvin wrote:
> > Note that Linux always accepts . and .. so it's just a matter of making them
> > appear in readdir.
> > 
> I'm working on that, but it's a learning experience for me, so it's going 
> a bit slow - but I'll get there.

Check the top of coda_venus_readdir in fs/coda/dir.c.

Coda's directories internally don't have the '.' and '..' as the first
two entries. In general it works just fine, I think there was one
application where it was causing a problem so now we use 'f_pos == 0'
and 'f_pos == 1' to spit out those entries based on dcache data.
f_pos >= 2 goes through the normal directory, but we skip the
out-of-order '.' and '..' entries.

Btw. the '.' and '..' entries are used by applications that are linked
against libc5 for the getpwd() implementation. I guess it was the only
way to get path information before the introduction of the dcache.

Oh, and the find -noleaf thing, a workaround for filesystems that don't
count subdirectories is to set the directory linkcount to 1 instead of
2 + number of subdirs. The find optimization then subtracts 2, and as a
result thinks there are (unsigned)-1 aka. UINT_MAX subdirectories and
find will end up calling stat() on every directory entry.

Jan


  reply	other threads:[~2005-03-27  4:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-22 15:47 Jan Engelhardt
2005-03-22 15:59 ` Jesper Juhl
2005-03-23 16:40   ` Pietro Zuco
2005-03-23 17:31     ` Jan Engelhardt
2005-03-23 17:49       ` Tom Vier
2005-03-24  7:01         ` Jan Engelhardt
2005-03-24 17:55         ` Geert Uytterhoeven
2005-03-24 19:36           ` Tommy Reynolds
2005-03-24 19:47             ` Jan Engelhardt
2005-03-24 22:31               ` Andreas Schwab
2005-03-24 19:59             ` H. Peter Anvin
2005-03-24 20:13               ` Kyle Moffett
2005-03-24 20:36                 ` H. Peter Anvin
2005-03-25 13:59                   ` Jesper Juhl
2005-03-27  4:05                     ` Jan Harkes [this message]
2005-03-27  9:16                       ` Jesper Juhl
2005-03-25 14:39                 ` Eric W. Biederman
2005-03-26  3:48                 ` Phil Lougher
2005-03-26  3:52                   ` H. Peter Anvin
2005-03-26  2:14                     ` Phillip Lougher
2005-04-20  4:39                       ` Jörn Engel
2005-03-26 10:03                   ` Jan Engelhardt
2005-03-27  1:56                     ` H. Peter Anvin
2005-03-26  2:39           ` Paul Jackson
2005-03-27  8:11 Adam J. Richter
2005-03-27  8:51 ` Jan Engelhardt

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=20050327040518.GA12072@delft.aura.cs.cmu.edu \
    --to=jaharkes@cs.cmu.edu \
    --cc=hpa@zytor.com \
    --cc=juhl-lkml@dif.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrmacman_g4@mac.com \
    /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

all inboxes | Powered by JetHome®