[Bug 20992] Data corruption triggers ext4 oops

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

 



https://bugzilla.kernel.org/show_bug.cgi?id=20992





--- Comment #3 from Theodore Tso <tytso@xxxxxxx>  2010-10-23 15:20:43 ---
Yep, looks like a bug alright. 

>From what I can tell, you were in the middle of async I/O, at the time when the
disk was corrupted.  The problem seemed to come after the I/O was completed,
and  ext4_convert_unwritten_extents() was trying to set the initialized bit on
the extent tree.  At that point the extent tree must have gotten corrupted on
disk, and this seriously confused the extent conversion code, which ended up
passing 0 to ext4_ext_put_in_cache() as the length of the extent, and that
tripped the BUG_ON in ext4_ext_put_in_cache().

How did you corrupt the file system while it was mounted?   Was it via some dd
to the disk device directly?

We do have code that checks to make sure the extent tree is sane, but we skip
it if the data was already in the buffer cache, to save CPU costs.  But if you
wrote to the disk device directly, it would have gone through the buffer cache,
since the extent tree was already cached, we would have skipped the validation
step, and that could be the explanation for how the bug got triggered.

If so, I'm loathe to turn on the validation check unconditionally, since that
would kill performance.  I can probably change the BUG_ON in
ext4_put_in_cache() to rather set the cache state to "invalid", which would at
least prevent the BUG_ON.  The filesystem was probably well and truly trashed,
though, so sooner or later the ext4 fs code would have hit something to cause
it to be very unhappy.  Hoepfully it would be an ext4_error() call to mark the
file system as corrupted, as opposed to another BUG_ON.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux