lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 08 Aug 2006 04:26:30 +0900
From:	Tejun Heo <htejun@...il.com>
To:	Harald Dunkel <harald.dunkel@...nline.de>
CC:	Pavel Machek <pavel@....cz>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	davidsen@....com
Subject: Re: 2.6.18-rc2, problem to wake up spinned down drive?

Harald Dunkel wrote:
> Tejun Heo wrote:
>> Pavel Machek wrote:
>>>> echo 1 > /sys/bus/scsi/devices/1:0:0:0/power/state
>>> Really? I thought power/state takes 0/3 (for D0 and D3)
>> Yes, of course.  My mistake.  Sorry about the confusion.  The correct
>> command is 'echo -n 3 > /sys/bus/scsi/devices/x:y:z:w/power/state'.
>>
> 
> (Sure?  :-)

The sleeping part is correct.  That will make libata put the disk to sleep.

> Now this did not work at all. The '-n 3' was probably
> correct, but when I tried to access the disk, then it
> did not spin up again (I waited for 5 minutes). There
> was no message on the console, either.
> 
> But I could not reproduce this problem.
> 
> How do I monitor that the disk spins down and up?

But the waking up part isn't.  You need to issue wake up explicitly by 
doing 'echo -n 0 > /sys/...'  I've been a complete idiot in this thread. 
  Please excuse me.  :-(

I think the solution to your problem is adjusting command timeout to 
more reasonable values which should make the problem more bearable. 
It'll take some time to figure out how to make timeouts more intelligent 
without breaking support for slow devices.  I'll work on that.

I'm attaching a temporary patch for the time being.

-- 
tejun

View attachment "patch" of type "text/plain" (988 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ