summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-disk.h
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2008-03-17 10:33:23 +0000
committerphk <phk@FreeBSD.org>2008-03-17 10:33:23 +0000
commit916647a52a03a583385f5a55dd2c00410a3c2075 (patch)
tree42facee2a8a6b82282cf32d98ef5558ca3765746 /sys/dev/ata/ata-disk.h
parent341d5f653b205917fac261a059ef06e686ae47ab (diff)
downloadFreeBSD-src-916647a52a03a583385f5a55dd2c00410a3c2075.zip
FreeBSD-src-916647a52a03a583385f5a55dd2c00410a3c2075.tar.gz
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
Diffstat (limited to 'sys/dev/ata/ata-disk.h')
-rw-r--r--sys/dev/ata/ata-disk.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-disk.h b/sys/dev/ata/ata-disk.h
index 1ebd3e0..562b32f 100644
--- a/sys/dev/ata/ata-disk.h
+++ b/sys/dev/ata/ata-disk.h
@@ -34,7 +34,7 @@ struct ad_softc {
u_int32_t transfersize; /* size of each transfer */
int num_tags; /* number of tags supported */
int flags; /* drive flags */
-#define AD_F_LABELLING 0x0001
+#define AD_F_LABELLING 0x0001
#define AD_F_CHS_USED 0x0002
#define AD_F_32B_ENABLED 0x0004
#define AD_F_TAG_ENABLED 0x0008
OpenPOWER on IntegriCloud