Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jun 1999 20:53:20 +0200 (CEST)
From:      Wilko Bulte <wilko@yedi.iaf.nl>
To:        chad@DCFinc.com
Cc:        jedgar@fxp.org, mike@smith.net.au, sec@42.org, des@flood.ping.uio.no, freebsd-stable@FreeBSD.ORG
Subject:   Re: / not properly unmounted ?
Message-ID:  <199906171853.UAA01003@yedi.iaf.nl>
In-Reply-To: <199906171637.JAA29029@freeway.dcfinc.com> from "Chad R. Larson" at "Jun 17, 1999  9:37:58 am"

next in thread | previous in thread | raw e-mail | index | archive | help
As Chad R. Larson wrote ...
> > On Thu, 17 Jun 1999, Mike Smith wrote:
> >>> I added a sysctl variable (machdep.powerdown_delay) to allow the
> >>> disk cache to flush by itself before APM powering the system off.
> >>> After applying the attached patch (tested on 3.2-STABLE) and
> >>> installing a new kernel, just use 'sysctl -w
> >>> machdep.powerdown_delay=5' for a 5 second delay.
> >>> 
> >>> I don't know if this is appropriate for actual inclusion into the
> >>> kernel...if so, I can see about merging it into -CURRENT and/or
> >>> changing to a more appropriate sysctl level (i.e.  kern, hw).
> >> 
> >> dingo:~>sysctl -a |grep delay
> >> kern.shutdown.poweroff_delay: 0
> >> ...
> >> 
> 
> Guys, this seems like the wrong solution to the original problem.
> 
> The first complaint was that the power-down was catching disk stuff
> still in cache.  Setting an arbitrary delay on the way down seems
> inefficient at best, and possibly not sufficient.  How about instead
> just making sure all buffers are flushed before the power-down is
> allowed to to occur, however long that takes?

The kernel can generally only check if *itself* has dirty buffers.
Does not help if a cache *on the disk* sits on unflushed data that goes
down the tubes when the power goes away. On SCSI you can send a SYNCHRONISE
CACHE command, which *should* work (but does not always according to my
info).

--
|   / o / /  _  	 Arnhem, The Netherlands	- Powered by FreeBSD -
|/|/ / / /( (_) Bulte 	 WWW  : http://www.tcja.nl 	http://www.freebsd.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906171853.UAA01003>