Subject: Re: test of new powerdown facility
To: None <fair@clock.org, khym@bga.com>
From: Matthew Jacob <mjacob@feral.com>
List: port-sparc
Date: 06/09/1998 12:29:42
>From tech-kern-owner-mjacob=feral.com@NetBSD.ORG  Tue Jun  9 12:26:38 1998
>X-Sender: eef-play@pop.mercy.st.clock.org
>Mime-Version: 1.0
>Content-Type: text/plain; charset="us-ascii"
>Date: Tue, 9 Jun 1998 12:10:37 -0700
>To: Dave Huang <khym@bga.com>
>From: "Erik E. Fair" <fair@clock.org>
>Subject: Re: test of new powerdown facility
>Cc: Jason Thorpe <thorpej@nas.nasa.gov>, port-sparc@NetBSD.ORG,
>        tech-kern@NetBSD.ORG
>Sender: tech-kern-owner@NetBSD.ORG
>Delivered-To: tech-kern@NetBSD.ORG
>
>At 11:14 -0700 6/9/98, Dave Huang wrote:
>>On Tue, 9 Jun 1998, Jason Thorpe wrote:
>>> So, if there is indeed a "commit to stable storage" SCSI command, it should
>>> be very straight-forward to implement such a shutdown hook.  Any takers?
>>>:-)
>>
>>I think the SYNCHRONIZE CACHE command will do what you want... opcode
>>0x35...
>
>The other issue here might simply be a failure of the kernel to wait long
>enough for I/O to complete.

That is a long standing unix bug- I haven't checked to see whether
or not it exists in *BSD.

>
>This is not to say that a "SYNCHRONIZE CACHE" command sent to *all* disks
>at any halt or powerdown event (and maybe in sync(2)?) is not a good idea...

Unless disks are set to ack data prior to comitting it to media,
this shouldn't be necessary. If the disks are set this way, and you
aren't UPS'd, you might as well turn all writes into B_ASYNC
operastions anyway.