From owner-freebsd-hackers Wed Jan 21 12:55:00 1998 Return-Path: Received: (from majordom@localhost) by catfish.freebsd.org (8.8.8/8.8.8) id MAA21864 for hackers-outgoing; Wed, 21 Jan 1998 12:55:00 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from hub.freebsd.org (hub.FreeBSD.ORG [204.216.27.18]) by catfish.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA21831 for ; Wed, 21 Jan 1998 12:53:45 -0800 (PST) (envelope-from owner-majordomo@FreeBSD.ORG) Received: from sendero.simon-shapiro.org (sendero-fxp0.Simon-Shapiro.ORG [206.190.148.34]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id MAA27025 for ; Wed, 21 Jan 1998 12:53:39 -0800 (PST) (envelope-from shimon@sendero-fxp0.simon-shapiro.org) Received: (qmail 21891 invoked by uid 1000); 21 Jan 1998 20:30:54 -0000 Message-ID: X-Mailer: XFMail 1.3-alpha-011998 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Wed, 21 Jan 1998 12:30:54 -0800 (PST) Reply-To: shimon@simon-shapiro.org Organization: The Simon Shapiro Foundation From: Simon Shapiro To: Calin Andrian Subject: Re: APC BackUPS driver Cc: freebsd-hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk 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