Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 522354

Summary: using reiserfs with tail packing on mdraid10 causes file corruption in small files
Product: Gentoo Linux Reporter: Harris Landgarten <harrisl>
Component: [OLD] Core systemAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED UPSTREAM    
Severity: normal CC: kfm
Priority: Normal    
Version: 10.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Harris Landgarten 2014-09-08 04:02:35 UTC
If reiserfs is used with mdraid10 or I assume other complex levels, random file corruption occurs in small files. In all cases the corruption shows as a files contents over-writing the correct contents but starting a few lines down and wiping out the end of the file. The file size does not change.

I was able to work around this issue but specifying notail on all reiserfs partitions. It seem tail packing is causing the corruption.

The corruption showed every day and was worse after a reboot. The files most noticeably damaged were header files in /usr/include, kernel utilities in scripts, files in the portage tree and metadata in /var/db but the corruption was system wide while intermittent. Sometimes an error would be fixed but would come back an hour or two later. Sometimes udev rules were damaged which prevented proper booting.

I don't know if there is any interest in fixing this but we should make sure to warn against reiserfs in complex mdraid configurations without notail in options.
Comment 1 Harris Landgarten 2014-09-08 11:40:29 UTC
This could be the 3.16 kernel bug as the kernel was upgraded to 3.16 around the same time as the change to mdraid10 from mdraid1
Comment 2 Mike Pagano gentoo-dev 2014-12-23 16:56:34 UTC
I can't ask you to test anything or do a bisect and face data loss. You may want to post this upstream to the appropriate maintainers.
Comment 3 Harris Landgarten 2014-12-23 17:09:14 UTC
It was a kernel bug which is now fixed. It was reported by quite a few people.