Date: Mon, 17 Mar 2008 10:33:24 +0000 (UTC) From: Poul-Henning Kamp <phk@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/sys ata.h src/sbin/atacontrol atacontrol.8 atacontrol.c src/sys/dev/ata ata-all.c ata-all.h ata-disk.c ata-disk.h Message-ID: <200803171033.m2HAXOeN055116@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
phk 2008-03-17 10:33:23 UTC
FreeBSD src repository
Modified files:
sys/sys ata.h
sbin/atacontrol atacontrol.8 atacontrol.c
sys/dev/ata ata-all.c ata-all.h ata-disk.c ata-disk.h
Log:
Add a "spindown" facility to ata-disks: If no requests have been received
for a configurable number of seconds, spin the disk down. Spin it back
up on the next request.
Notice that the timeout is only armed by a request, so to spin down a
disk you may have to do:
atacontrol spindown ad10 5
dd if=/dev/ad10 of=/dev/null count=1
To disable spindown, set timeout to zero:
atacontrol spindown ad10 0
In order to debug any trouble caused, this code is somewhat noisy on the
console.
Enabling spindown on a disk containing / or /var/log/messages is not
going to do anything sensible.
Spinning a disk up and down all the time will wear it out, use sensibly.
Approved by: sos
Revision Changes Path
1.30 +8 -0 src/sbin/atacontrol/atacontrol.8
1.47 +27 -0 src/sbin/atacontrol/atacontrol.c
1.281 +6 -0 src/sys/dev/ata/ata-all.c
1.128 +3 -0 src/sys/dev/ata/ata-all.h
1.207 +49 -1 src/sys/dev/ata/ata-disk.c
1.53 +1 -1 src/sys/dev/ata/ata-disk.h
1.39 +3 -0 src/sys/sys/ata.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803171033.m2HAXOeN055116>
