Re: [PATCH] Re: Corrupted inode list?

Steven L Baur (steve@miranova.com)
05 Jan 1997 07:00:07 -0800


I am getting this error in spades on an IDE disk (2.0.27, no patches
200MHz Pentium with 64MB of RAM).

...
Dec 31 03:03:50 altair kernel: EXT2-fs warning (device 16:02): ext2_free_inode: bit already cleared for inode 102442
Dec 31 03:03:50 altair kernel: EXT2-fs warning (device 16:02): ext2_free_inode: bit already cleared for inode 102443
Dec 31 03:03:50 altair kernel: EXT2-fs warning (device 16:02): ext2_free_inode: bit already cleared for inode 102444
Dec 31 03:04:01 altair kernel: EXT2-fs warning (device 16:02): ext2_free_inode: bit already cleared for inode 102441
...
Jan 3 12:20:42 altair kernel: EXT2-fs warning (device 16:02): ext2_free_inode: bit already cleared for inode 170081

I've only detected it occuring on the machine's third disk, and it
seems to bite 4 consecutive inodes at a time when it strikes.

>>>>> "Benjamin" == Benjamin C R LaHaise <blah@dot.superaje.com> writes:

Benjamin> On Fri, 29 Nov 1996, Stephen C. Tweedie wrote:

>> Ahh, *this* ugly problem rears its head again. I thought we had slain
>> this three years ago. :)
>>
>> > Ok, this is still the same bug I've had a patch avail for the past
>> > month... no more inode corruption. The following patch fixes the
>> > following:
>> > a. inode list corrupted if put_inode slept after calling
>> > clear_inode, inode could be allocated by iget
>>
>> This shouldn't happen. We found this problem after a long period of
>> searching, and Linus and I fixed it before 1.0. It is _really_ subtle
>> --- anybody remember all the "bit already cleared" error reports that
>> were floating around just prior to 1.0?
>>
>> The problem hasn't been seen in years, but if you are experiencing it
>> on a VFAT filesystem then my immediate reaction is that FAT itself is
>> doing something wrong.
>>
>> On investigation this appears to be the case --- FAT is ignoring a
>> totally undocumented requirement of the VFS. :) The reuse of inodes
>> can't happen as long as the put_inode() operation keeps the inode
>> in-use flag set right up until the end. Under the ext2fs, for
>> example, we call clear_inode() (thus clearing inode->i_nlinks) right
>> before the final unlock and return in ext2_free_inode(). FAT,
>> however, clears the inode and then continues to iput() a couple of
>> other inodes, an operation which can block. <Beep> Wrong move, you
>> lose.
>>
>> Does this much smaller patch fix your problem?

-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.
"That Bill Clinton.  He probably doesn't know how to log on to the
Internet."  -- Rush Limbaugh, noted Computer Expert