From owner-freebsd-current@FreeBSD.ORG Fri May 21 08:59:37 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9BB2216A4CE for ; Fri, 21 May 2004 08:59:37 -0700 (PDT) Received: from corbulon.video-collage.com (corbulon.video-collage.com [64.35.99.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0874E43D41 for ; Fri, 21 May 2004 08:59:37 -0700 (PDT) (envelope-from mi+mx@aldan.algebra.com) Received: from 250-217.customer.cloud9.net (195-11.customer.cloud9.net [168.100.195.11])i4LFx9hx073437 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 May 2004 11:59:10 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) Received: from localhost (mteterin@localhost [127.0.0.1]) i4LFx3Lm033576; Fri, 21 May 2004 11:59:04 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) From: Mikhail Teterin Organization: Virtual Estates, Inc. To: Steve Byan Date: Fri, 21 May 2004 11:59:03 -0400 User-Agent: KMail/1.6.1 References: <20040517174836.GA983@frontfree.net> <200405201615.51539@misha-mx.virtual-estates.net> <7CE7075D-AB35-11D8-B0BF-000A957CD5B0@egenera.com> In-Reply-To: <7CE7075D-AB35-11D8-B0BF-000A957CD5B0@egenera.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="koi8-u" Content-Transfer-Encoding: 7bit Message-Id: <200405211159.03075@misha-mx.virtual-estates.net> X-Scanned-By: MIMEDefang 2.39 X-Mailman-Approved-At: Sat, 22 May 2004 05:15:46 -0700 cc: current@freebsd.org Subject: Re: QMail and SoftUpdates X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 15:59:37 -0000 =On May 20, 2004, at 4:15 PM, Mikhail Teterin wrote: => =No. Unlike SCSI disks, ATA disks will toss their write-cache on a => =reset. When the system crashes and the BIOS starts rebooting, guess => =what it issues to the ATA disks? Yep, a reset. = =I checked with my BIOS source, and I got this wrong. After a crash, the =BIOS is usually entered as a result of the crash-code (panic(), in the =case of *BSD) invoking a hard reset by writing to the reset bit of I/O =port 92. This causes a reset of the hardware, which includes the PCI =bus and the ATA disks as well as the CPU. So, you are saying, disks are reset _before_ rebooting? I thought, you meant _during_ boot... => So with ATA write-cache =enabled, your filesystem is likely to be => toast after a crash, as well =as after a power failure. => => Is not this only of concern if the power is restored and the BIOS => resets the disks _before_ they flush their write caches? I'd expect => them to do that (the flushing) within seconds anyway, no? =I'm confused by your reference to the restoration of power in your =question. If you lose power to the whole system, then it's game over. =Are you suggesting that the disks might be powered separately from the =CPU and motherboard, and that the CPU might lose power and then regain =it while the disks are still powered? I don't know of any systems that =are designed that way. Here are some examples of SATA-based external arrays: http://store.sun.com/CMTemplate/CEServlet?process=SunStore&cmdViewProduct_CP&catid=114140 I'm sure, there are more. =Yes, if the disks manage to win the race by flushing their write cache =before the hard reset is issued by the crash code, then everything is =fine. [...] I think the panic code quite soon after getting control, =and the disks flush their write cache rather lazily, rather than =eagerly. Does not panic() wait 15 seconds after flushing buffers before automaticly rebooting? Or may that not be enough either? -mi