public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Phil Lougher <phil.lougher@gmail.com>
To: Kyle Moffett <mrmacman_g4@mac.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org, phillip@lougher.demon.co.uk
Subject: Re: Squashfs without ./..
Date: Sat, 26 Mar 2005 03:48:35 +0000	[thread overview]
Message-ID: <cce9e37e0503251948527d322b@mail.gmail.com> (raw)
In-Reply-To: <3e74c9409b6e383b7b398fe919418d54@mac.com>

On Thu, 24 Mar 2005 15:13:08 -0500, Kyle Moffett <mrmacman_g4@mac.com> wrote:
> I would add ".." and "." to squashfs, just so that it acts like the rest
> of the filesystems on the planet,

Cramfs also doesn't store '.' and '..', which is where I got the idea
from in the first place when originally implementing Squashfs.

Filesystems don't need to store '.' or ''..' in the filesystem, as
they're never looked up by the VFS - as mentioned elsewhere in this
thread, the VFS handles '.' and '..' internally.

Not storing the redundant '.' and '..' entries within the filesystem
achieves a small but nonetheless useful space saving.

> even if it has to emulate them
> internally.

Making readdir return '.' and '..' is trivially easy, as all the
required information to fake '.' and '..' entries are present.

The lack of '.' and '..' entries hasn't caused any problems despite
cramfs/squashfs being used for a large number of years.  I'm inclined
to believe any application that _relies_ on seeing '.' and '..'
returned by readdir is broken.  This situation is easily fixed within
the application rather than forcing the filesystem to unnecessarily
fake '.' and '..' entries which are never used.

> OTOH, I think that the default behavior of find is broken
> and should probably be fixed, maybe by making the default use the full
> readdir and optionally allowing a -fast option that optimizes the
> search using such tricks.
> 

Cramfs/Squashfs and other filesystems set the link count on files and
directories to 1, find correctly interprets this to mean it can't do
any of its 'tricks' and doesn't use any optimisations.

Phillip

  parent reply	other threads:[~2005-03-26  3:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-22 15:47 Squashfs without ./ 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
2005-03-27  9:16                       ` Jesper Juhl
2005-03-25 14:39                 ` Eric W. Biederman
2005-03-26  3:48                 ` Phil Lougher [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
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=cce9e37e0503251948527d322b@mail.gmail.com \
    --to=phil.lougher@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrmacman_g4@mac.com \
    --cc=phillip@lougher.demon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox