public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
	Andrew Morton <akpm@osdl.org>, r6144 <rainy6144@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"ext2-devel@lists.sourceforge.net"
	<ext2-devel@lists.sourceforge.net>,
	phillips@istop.com, Alex Tomas <alex@clusterfs.com>,
	Christopher Li <chrisl@vmware.com>,
	Christopher Li <ext2-devel@chrisli.org>
Subject: Re: Fw: [POSSIBLE-BUG] telldir() broken on ext3 dir_index'd directories just after the first entry.
Date: Thu, 18 Nov 2004 09:06:45 -0500	[thread overview]
Message-ID: <20041118140645.GA5306@thunk.org> (raw)
In-Reply-To: <Pine.LNX.4.53.0411181221360.12219@yvahk01.tjqt.qr>

On Thu, Nov 18, 2004 at 12:22:38PM +0100, Jan Engelhardt wrote:
> >So instead what we need to do is wire '.' and '..' to have hash values
> >of (0,0) and (2,0), respectively, without ignoring other existing
> >dirents with colliding hashes.  (In those cases the programs will
> >break, but they are statistically rare, and there's not much we can do
> >in those cases anyway.)
> 
> IMO it's better to fix the mess all at once to have it weeded out for some
> months.

Programs that assume that '.' and '..' are the first and second
entries of a directory are intrinsically broken; POSIX never
guaranteed this to be the case.  Unfortunately, historically things
have always worked that way, and so there may be some broken programs
lurking out there.  But there's really not much we can do.

Before, we hard-wired '.' and '..' to always be first, at the cost of
breaking programs that used the (broken by design) POSIX
telldir/seekdir interfaces.  Since telldir/seekdir, however badly
designed, are part of POSIX, it seems appropriate to let those
programs work, but the cost is a statistical probability that programs
making assumptions about the order of '.' and '..' will break.  We
don't really have a choice here.  

(Actually, I guess we could define a new hash function that never
produces certain hash values, but that would break compatibility with
all existing deployed filesystems that use ext3 htree.  That's not an
option, either.  So again, making a best effort, but breaking programs
that are fundamentally broken is the best we can do.)

						- Ted

  reply	other threads:[~2004-11-18 14:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20041116183813.11cbf280.akpm@osdl.org>
2004-11-17 22:34 ` Fw: [POSSIBLE-BUG] telldir() broken on ext3 dir_index'd directories just after the first entry Theodore Ts'o
2004-11-18  0:00   ` Stephen C. Tweedie
2004-11-18  4:53     ` Theodore Ts'o
2004-11-18 11:22       ` Jan Engelhardt
2004-11-18 14:06         ` Theodore Ts'o [this message]
2004-11-18 15:40           ` Jan Engelhardt
2004-11-18 15:37       ` Stephen C. Tweedie

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=20041118140645.GA5306@thunk.org \
    --to=tytso@mit.edu \
    --cc=akpm@osdl.org \
    --cc=alex@clusterfs.com \
    --cc=chrisl@vmware.com \
    --cc=ext2-devel@chrisli.org \
    --cc=ext2-devel@lists.sourceforge.net \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillips@istop.com \
    --cc=rainy6144@gmail.com \
    --cc=sct@redhat.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