Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jan 1998 12:30:54 -0800 (PST)
From:      Simon Shapiro <shimon@simon-shapiro.org>
To:        Calin Andrian <calin@ibd.dbio.ro>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: APC BackUPS driver
Message-ID:  <XFMail.980121123054.shimon@simon-shapiro.org>
In-Reply-To: <Pine.BSF.3.96.980121085317.5071A-100000@ibd.dbio.ro>

next in thread | previous in thread | raw e-mail | index | archive | help

On 21-Jan-98 Calin Andrian wrote:
> 
> 
> On Tue, 20 Jan 1998, Bruce M. Walter wrote:
> 
>> 
>> I have a DPT SCSI RAID controller here whose driver uses
>> at_shutdown/POSTSYNC to flush it's (enormous!) internal disk buffers.
>> When the power goes off during this it insures lost data.  I didn't get
>> bit by this with your code (I did it all by myself ;) but just wanted to
>> warn you in case you wanted to put a note in your tarball.
>> 
>> I have a solution which works in all cases and supports any cable
>> configuration, but requires a kernel patch :(  I've been looking for a
>> way
>> around this and will let you know if I find one.  Keep up the good work.
> 
> I didn't think there could be any real trouble. I looked through the
> standard kernel sources and didn't find any critical devices wanting to
> do
> anything at shutdown. On the other hand, I gave it a moment's thought
> about patching kern_shutdown.c but quit really quick. Now that you opened
> my eyes I think that maybe it's time to add another option (and list of
> routines - or only ONE routine) to at_shutdown. Something like
> at_shutdown(func, arg, SHUTDOWN_FOR_REAL) ment specifically for shutting
> down power.

I think you need to be a bit more careful than that.  You should not force
a shutdown before ALL drivers have completed their at_shutdown calls.
This is essential.  The purpose of a UPS is to extend the system's life, to
avoid power failure disasters.

While you are looking around that code, try to hunt down this problem:

Sometimes, after at_shutdown is called, the rebooting code actually tries
to flush buffers.  At this point, the DPT has already shutdown.

> 
> I'll look into it.
> 
> I'd like to work on it now that I already started this UPS matter.
> 
> Later,
> 
> Calin
> 
> 

----------


Sincerely Yours, 

Simon Shapiro
Shimon@Simon-Shapiro.ORG                      Voice:   503.799.2313



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