Date: Thu, 16 Sep 2010 10:06:44 -0500 From: Nathan Whitehorn <nwhitehorn@freebsd.org> To: freebsd-hackers@freebsd.org Subject: Re: Summary: Re: Spin down HDD after disk sync or before power off Message-ID: <4C923284.20304@freebsd.org> In-Reply-To: <alpine.BSF.2.00.1009160831560.68314@wonkity.com> References: <alpine.BSF.2.00.1003051636030.2481@wonkity.com> <201009152143.o8FLhE9p022233@lurza.secnetix.de> <20100916004902.GA46401@freebsd.org> <alpine.BSF.2.00.1009160831560.68314@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 09/16/10 09:42, Warren Block wrote: > On Thu, 16 Sep 2010, Alexander Best wrote: > >> On Wed Sep 15 10, Oliver Fromme wrote: >>> Warren Block <wblock@wonkity.com> wrote: >>> > [...] >>> > 8. Alexander Motin has an updated CAM version of the ATA system which >>> > will eventually replace the existing one. In -CURRENT, anyway. >>> He was >>> > kind enough to look at my event handler. My understanding is that >>> he is >>> > looking at implementing the head parking/standby mechanism in that >>> new >>> > code. >>> >>> The patch below will work with the new CAM ATA driver >>> (i.e. ada(4) disks). It adds a sysctl, so you can switch >>> the spin-down off if you're going to just reboot: >>> # sysctl kern.cam.ada.spindown_shutdown=0 >> >> i haven't tested your patch yet, but i don't think deciding whether >> to spin >> down the hdd should be decided merely from the sysctl value. >> >> the hdd should spindown when a shutdown has been issued and not >> spindown, >> if a reboot has been issued. > > It's been a while, but the problem I found when comparing the NetBSD > code was that there didn't appear to be a way to tell from within the > FreeBSD driver whether it was a shutdown or reboot. Register a shutdown event handler? The second argument can be tested against RB_HALT to determine what is happening. -Nathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C923284.20304>