lkml.org 
[lkml]   [2004]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: problems with ext3 fs, kernels up to 2.6.6-rc2
On May 19, 2004  14:41 +0400, Paul P Komkoff Jr wrote:
> For a long time I'm sorta have the following problem.
>
> I have ext3 partition with dir_index turned on. I have programs, which
> store many files on it (for example, Maildir mailboxes for 500+ users,
> about 200k files).
>
> Sometimes something going wrong. I am noticing it by rdiff-backup on
> this partition producing the following output:
> ListError goloub/Maildir/cur/1082623479.1763_0.ns:2,S [Errno 5]
> Input/output error:
> +'/mnt/mail/goloub/Maildir/cur/1082623479.1763_0.ns:2,S'
>
> Yes, when I am doing strace ls -al (failed file), I am seeing -EIO
>
> lstat64("/mnt/mail/goloub/Maildir/cur/1082623479.1763_0.ns:2,S",
> 0x806408c) = -1 EIO (Input/output error)
>
> I know, so when I will e2fsck it it will be repaired. But how I can
> help debug it?
>
> Which on-disk structs I need to examine, maybe extract, and send to
> someone?

A problem with htree was recently discovered during Lustre testing when
files were being renamed within the same directory. In some cases the
addition of the new name caused a directory block split and the old
dir_entry was pointing at the wrong entry, and the wrong entry was removed.
This would seem entirely possible in a Maildir directory, since the MTA
will be doing a lot of renames within the same directory.

This seems to fix the majority of the problems, although there are still
some rare failures in the rename test.

===== fs/ext3/namei.c 1.52 vs edited =====
--- 1.52/fs/ext3/namei.c Mon May 10 05:25:34 2004
+++ edited/fs/ext3/namei.c Wed May 19 10:59:39 2004
@@ -2265,7 +2265,9 @@
* ok, that's it
*/
retval = ext3_delete_entry(handle, old_dir, old_de, old_bh);
- if (retval == -ENOENT) {
+ if (le32_to_cpu(old_de->inode) != old_inode->i_ino ||
+ (retval = ext3_delete_entry(handle, old_dir, old_de, old_bh)) ==
+ -ENOENT) {
/*
* old_de could have moved out from under us.
*/
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.056 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site