Rely on the disk to spin itself down
authorDavid Zeuthen <davidz@redhat.com>
Sun, 9 Aug 2009 18:39:47 +0000 (14:39 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Sun, 9 Aug 2009 18:39:47 +0000 (14:39 -0400)
commitdad138fc1d08aa7b395bef8a53402f0a214d409c
treeff7f0d19add3ee63ceb7fa7ac92cb65268baf491
parent2e120fa0b54e9b9e5312d5056eacee33e4804e28
Rely on the disk to spin itself down

In other words, instead of playing games with watching
/sys/block/sdX/stat files and sending a STANDBY IMMEDIATE command when
these haven't changed for a while, just use the STANDBY command itself
with the timeout value.

This avoids having to wake up the daemon every five seconds. In
addition, this change ensures that device specific minimums are
respected.

We didn't do this in the original commit because while testing the
feature, some of disks, notably ones from WD, appeared to not respect
the STANDBY command. However, when moved to another enclosure (the
disks was initially in a SATA PM enclosure, it got moved to a SAS
enclosure) things started working again. Also turns out the WD disk in
question has a device specific timeout of 10 minutes.
doc/man/devkit-disks.xml
src/Makefile.am
src/devkit-disks-daemon.c
src/devkit-disks-device-private.h
src/devkit-disks-device.c
src/job-drive-standby.c [deleted file]