public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Hugo Mills <hugo-lkml@carfax.org.uk>,
	Clemmitt Sigler <siglercm@jrt.me.vt.edu>,
	Marcelo Tosatti <marcelo@conectiva.com.br>,
	lkml <linux-kernel@vger.kernel.org>,
	Alan Cox <Alan.Cox@linux.org>
Subject: Re: 2.4.20-rc3 ext3 fsck corruption -- tool update warning needed?
Date: Mon, 25 Nov 2002 22:55:56 -0500	[thread overview]
Message-ID: <20021126035556.GB11903@think.thunk.org> (raw)
In-Reply-To: <20021125105739.GA7531@carfax.org.uk>

On Mon, Nov 25, 2002 at 10:57:39AM +0000, Hugo Mills wrote:
>    Running fsck recovers the missing files into lost+found, but
> doesn't remove the duplicated filenames. 

E2fsck doesn't currently check for duplicated files in a directory.
It probably should, but doing so would increase its required memory
usuage and/or its run-time, at least in the non-HTREE case, which is
why I never implemented it.  (Currently we scan all directory blocks
in the filesystem sorted by disk block number, to avoid seeks.  So in
order to check for duplicates, we would either need to allocate enough
disk space to store all directory entries on the filesystem in memory
--- which would take up lost of memory --- or scan directory blocks
directory by directory, which would significantly increase the number
of seeks needed by e2fsck in its pass 2 processing.)

If the directory is indexed using the HTREE format, or the directories
are going to be optimized anyway by specifying the -D option in newer
versions e2fsck, adding support for detecting duplicate filenames
would be really cheap, so I'll very likely end up adding this feature
in an upcoming release of e2fsck.

Given the reports that people with xfs filesystems are also seeing
filesystem corruption, it sounds like filesystem blocks are getting
written to the wrong location on disk.  That would explain the
duplicate filenames in the directory, as well as files disappearing.
In general this sort of corruption is relatively rare, which is
another reason why I havne't bothered with adding that support to
e2fsck.

						- Ted

  parent reply	other threads:[~2002-11-26  3:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-25  5:12 2.4.20-rc3 ext3 fsck corruption -- tool update warning needed? Clemmitt Sigler
2002-11-25 10:57 ` Hugo Mills
2002-11-25 14:21   ` Clemmitt Sigler
2002-11-26  3:55   ` Theodore Ts'o [this message]
2002-11-25 17:15 ` Matthias Andree
2002-11-25 17:39   ` Tomas Konir
2002-11-25 18:37   ` Clemmitt Sigler
2002-11-26  2:47 ` Theodore Ts'o
2002-11-26 15:55   ` Clemmitt Sigler
2002-11-27 12:55     ` Theodore Ts'o
2002-11-27 14:28       ` Clemmitt Sigler
2002-11-28 22:49       ` Andries Brouwer
2002-11-28 23:47         ` GertJan Spoelman
  -- strict thread matches above, loose matches on Subject: below --
2002-11-27 13:39 Margit Schubert-While
2002-11-27 15:18 ` Alan Cox
2002-11-27 20:47   ` Theodore Ts'o

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=20021126035556.GB11903@think.thunk.org \
    --to=tytso@mit.edu \
    --cc=Alan.Cox@linux.org \
    --cc=hugo-lkml@carfax.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=siglercm@jrt.me.vt.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