From owner-freebsd-fs Wed Sep 20 0:41:43 2000 Delivered-To: freebsd-fs@freebsd.org Received: from freebsd.dk (freebsd.dk [212.242.42.178]) by hub.freebsd.org (Postfix) with ESMTP id CCA9337B422; Wed, 20 Sep 2000 00:41:39 -0700 (PDT) Received: (from sos@localhost) by freebsd.dk (8.9.3/8.9.1) id JAA44730; Wed, 20 Sep 2000 09:45:33 +0200 (CEST) (envelope-from sos) From: Soren Schmidt Message-Id: <200009200745.JAA44730@freebsd.dk> Subject: Re: disable write caching with softupdates? In-Reply-To: <200009200703.AAA00154@usr05.primenet.com> from Terry Lambert at "Sep 20, 2000 07:03:59 am" To: tlambert@primenet.com (Terry Lambert) Date: Wed, 20 Sep 2000 09:45:33 +0200 (CEST) Cc: archie@whistle.com (Archie Cobbs), fs@FreeBSD.ORG, sos@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org It seems Terry Lambert wrote: > > Isn't it safer (in the face of a power failure) to disable write > > caching on a hard disk when softupdates is in use? > > Yes. You _must_ guarantee that the drive does not complete > writes out of sequence that it reports having completed in > sequence. Hardware which lies is evil. Hmm, the write caching on ATA drives (if they support it at all, very few actually does), is guarantied to be able to write the data to disk on power failure, or at least so they say, and I've not been able to prove otherwise. > > The ata driver currenly always enables write caching. Perhaps > > there should be a sysctl knob to turn it on/off? > > Write caching should _never_ be enabled, unless you don't > care about the data, or the drive reports the operation > queueing and completion seperately, so that the OS knows > the completion order; even then, the OS will have to be > prepared to stall writing new data until completion has > occurred at any given synchronizatin point, so that it is > impossible for the drive to complete the requests out of > the order permitted by the OS. Hmm, they way this (should) work in ATA drives there should be no such problem, and I've never seen it, and belive me I've treid hard to provoke problems this way... -Søren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message