From owner-freebsd-stable Sun May 6 11:48:46 2001 Delivered-To: freebsd-stable@freebsd.org Received: from glatton.cnchost.com (glatton.cnchost.com [207.155.248.47]) by hub.freebsd.org (Postfix) with ESMTP id 28ACE37B422 for ; Sun, 6 May 2001 11:48:43 -0700 (PDT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (adsl-209-204-185-216.sonic.net [209.204.185.216]) by glatton.cnchost.com id OAA29301; Sun, 6 May 2001 14:48:27 -0400 (EDT) [ConcentricHost SMTP Relay 1.10] Message-ID: <200105061848.OAA29301@glatton.cnchost.com> To: "Juha Saarinen" Cc: "Doug Russell" , "Matt Dillon" , "freebsd-stable" Subject: Re: soft update should be default In-reply-to: Your message of "Sun, 06 May 2001 12:06:55 +1200." Date: Sun, 06 May 2001 11:48:26 -0700 From: Bakul Shah Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Daryl says that IBM drives are less likely to cause corruption, as they > shipped with a decently-sized power capacitor which in most cases will have > enough power to complete the cache write-out. This doesn't help with caching > SCSI controllers, obviously. See http://www.complang.tuwien.ac.at/anton/hdtest/ where Anton Ertl (author of the above test) says: I have tested a Quantum Fireball CR8.4A disk in the default configuration under Linux 2.2.1 on a Red Hat 5.1 distribution. The result was that block 0 was not even written once to the disk (i.e., the "last commited" line had the wrong magic number) before I turned off the power, while hundreds of other blocks were written. I got the same result on a IBM-DHEA-36480. I then turned off write caching on the Quantum with hdparm -W 0 /dev/ and repeated the test. In contrast to earlier hdtest was now quite noisy and produced the correct result. This implies that the hard disk originally (in the default setting) used write caching and somehow "optimized" the writes to block 0 away. My conclusion is that applications and file systems requiring in-order writes should turn off write caching for the disk they use. His program writes to a raw partition in a sequence like block 1000, block 0, block 1001, block 0, block 1002, block 0 ... and he powers off the machine in the middle and checks on reboot what happened. -- bakul To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message