Hi!

I had a temporary disk failure (played with acpi too much). What
happened was that disk was not able to do anything for five minutes
or so. When disk recovered, linux happily overwrote all inodes it
could not read while disk was down with zeros -> massive disk
corruption.

Solution is not to write bad inodes back to disk.

[Thanx to Jan Kara]                                                         
                                                                Pavel

--- clean/fs/inode.c    Wed Apr  4 23:58:04 2001
+++ linux/fs/inode.c    Sun Apr 22 14:04:46 2001
@@ -179,7 +179,7 @@
 
 static inline void write_inode(struct inode *inode, int sync)
 {
-       if (inode->i_sb && inode->i_sb->s_op && inode->i_sb->s_op->write_inode)
+       if (inode->i_sb && inode->i_sb->s_op && inode->i_sb->s_op->write_inode && 
+!is_bad_inode(inode))
                inode->i_sb->s_op->write_inode(inode, sync);
 }
 
-- 
I'm [EMAIL PROTECTED] "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to