[lkml]   [2001]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [patch] linux likes to kill bad inodes

> >> > 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.
> >> >
> >>
> >> Wouldn't we rather make it so bad inodes don't get marked dirty at all?
> >
> > I guess this is cheaper: we can mark inode dirty at 1000 points, but
> > you only write it at one point.
> Whoops, I worded that poorly. To me, it seems like a bug to dirty a bad
> inode. If this patch works, it is because somewhere, somebody did
> something with a bad inode, and thought the operation worked (otherwise,
> why dirty it?).
> So yes, even if we dirty them in a 1000 different places, we need to find
> the one place that believes it can do something worthwhile to a bad inode.

Okay, so what about following patch, followed by attempt to debug it?
[I'd really like to get patch it; killing user's data without good
reason seems evil to me, and this did quite a lot of damage to my

PS: Only filesystem at use at time of problem was ext2, and it was
ext2 iinode that got killed.

--- clean/fs/inode.c Wed Apr 4 23:58:04 2001
+++ linux/fs/inode.c Fri Apr 27 00:25:46 2001
@@ -179,6 +179,10 @@

static inline void write_inode(struct inode *inode, int sync)
+ if (is_bad_inode(inode)) {
+ printk(KERN_CRIT "Cowardly refusing to kill your inode\n");
+ return;
+ }
if (inode->i_sb && inode->i_sb->s_op && inode->i_sb->s_op->write_inode)
inode->i_sb->s_op->write_inode(inode, sync);

I'm "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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