Re: Laptop mode causing writes to wrong sectors?
From: Bart Samwel
Date: Thu Nov 17 2005 - 11:07:30 EST
Jan Niehusmann wrote:
Bradley, Jan, since when have these problems been happening? Kernel
version-wise, I mean?
I didn't notice these problems before 2.6.14. As these corruptions are
not happening very often, and as I usually do not run the notebook on
battery power, the problem may have existed for a while, though.
Today I did a simple test: I activated laptop mode with a 10s idle
timeout, and made a script write files with uniqe identifiers, followed
by a sync, every 60 seconds. After nearly an hour, I didn't see any
corruption, though at least some of these writes have triggered
a spin-up. When I have some spare time I'll do more intensive testing.
Well, the syncs should trigger a spinup every time. Laptop mode does not
influence syncs, really.
Additionally, I mounted more than half of the partitions on this
notebook read only, and made a 1:1 copy of these partitions to an
external hard drive. Therefore, I can check later if something
accidentally did write to these areas.
"more than half"? Exactly how many partitions *are* there on this
notebook? ;)
If you have any suggestions for additional test, please tell me.
Perhaps you could enable /proc/sys/vm/block_dump. This makes the kernel
output all disk activity, including block numbers. By looking up the
corrupted block numbers in your logs you can check later if the
corrupting write was done by the kernel (i.e., software fault) or not
(hardware fault).
Note that the output of block_dump may not go into your logs by default,
because it's output with KERN_DEBUG. You may need to change your log
settings.
You can add extra context on ext3's state by enabling JBD debugging
(CONFIG_JBD_DEBUG, IIRC).
The random filesystem corruption had one positive effect: I never had
such a good backup of my data before. ;-)
It made me rethink my backup strategy as well. :)
--Bart
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/