[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Failures they e2fsck doesn't find



On Feb 10, 2005  14:40 +0100, Jörg Sommer wrote:
> > This is from the command-line.  Note specifically the '\' before ls, so
> > that you don't get anything like color-ls trying to stat all of the files.
> 
> There are no errors with \ls.

Ok, this means there is a bug with the htree indexing, possibly due to
the use of 8-bit characters (though I can't see anything obvious in that
regard).  It might be that e2fsck is indexing them
incorrectly, or the kernel, or both.

> > If you run "tune2fs -O ^dir_index" does the ls work again?
> 
> yes.
> 
> Can I add the index again?

Yes, "tune2fs -O dir_index".  If you haven't created any large directories
or added files to large directories since it was turned off then there isn't
anything else to do (the htree indexing maintains internal consistency even
when disabled, at worst reverting to linear searching until "e2fsck -fD" is
run).

After you do that can you run the following:

mkdir {new_dir}
cd {old_dir}
\ls | (cd {new_dir}; xargs touch)

and then

debugfs {dev}
debugfs> htree {old_dir}
debugfs> htree {new_dir}

What is of interest is whether the hash values of any of the entries are
different (which would imply that e2fsck and the kernel disagree in the
hash value of some entry).  In particular, the kernel is looking for
hash value H in a bucket (dir leaf block) that spans from (H-m) to (H+n)
and isn't finding it, but a linear directory search IS finding it.

Unfortunately, the debugfs "hash" function only calculates the dx_hash,
and your filesystem almost certainly isn't using that.  We probably need
a new "tea_hash" and "md4_2_hash" commands, and then "hash" by default
picks the current fs hash value (the seed optionally being specified for
each command).

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://members.shaw.ca/adilger/             http://members.shaw.ca/golinux/

Attachment: pgp00014.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]