Re: Laptop mode causing writes to wrong sectors?

From: Bill Davidsen
Date: Fri Nov 18 2005 - 13:43:46 EST


Pavel Machek wrote:
Hi!


let me start by stating that the following is mainly guessed. I may be
completely wrong. Still I think you may be interested in my
observations, and perhaps you already got similar reports?

On my laptop, running 2.6.14, I'm observing some strange file- and
filesystem corruptions. First, I thought it may have been caused by an
ext3 bug because the first corruption I did observe happened shortly
after an ext3 journal replay.

I did report this to linux-kernel, but without any helpful response:
http://www.ussg.iu.edu/hypermail/linux/kernel/0511.0/0129.html
(Subject: ext3 corruption: "JBD: no valid journal superblock found")

But now, I got another hint pointing to a possible cause of this
problem: I found a file - /usr/lib/libatlas.so.3.0 - which was corrupted
by 4k of it being overwritten by a different file, which I recognized. And that file happened to be an uncompressed manual page.

As usually the manual pages are only stored compressed, this must have
happened when I actually did look at that manual page, which causes the
uncompressed version to be written to a file in /tmp/. And the best is:
I actually remember when I did read that man page, and it was while the
notebook ran on battery power, which is quite seldom. On battery power,
I have laptop mode activated and the hard disk spun down after a short
idle time.

Why do I think this is related to the corruption? Well, on the one hand,
I'm compiling kernels quite often, tracking linus' git repository,
and


Can you try some filesystem test while forcing disk spindowns via
hdparm?

It may be bug in laptop mode, or a bug in ide (or something
related)... trying spindowns without laptopmode would be helpful.

I don't know if it would be helpful, but I run several servers with multiple drives, usually 4-5, some of which are in RAID and some aren't, and they all spin down and restart without problems many times a day. The kernel is 2.6.14.? with one patch to get my unsupported VIA IDE working.

My laptop also has a spindown (five min from memory) and I have yet to have a problem with it. Don't know if any of that is "spindowns without laptopmode" in a useful sense.

--
-bill davidsen (davidsen@xxxxxxx)
"The secret to procrastination is to put things off until the
last possible moment - but no longer" -me
-
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/