From owner-freebsd-fs@FreeBSD.ORG Mon May 17 19:26:09 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E08216A4CE for ; Mon, 17 May 2004 19:26:09 -0700 (PDT) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B39843D48 for ; Mon, 17 May 2004 19:26:09 -0700 (PDT) (envelope-from garycor@comcast.net) Received: from comcast.net (pcp09118143pcs.union01.nj.comcast.net[69.142.234.88]) by comcast.net (sccrmhc11) with SMTP id <20040518022607011000pvpte> (Authid: garycor); Tue, 18 May 2004 02:26:08 +0000 Message-ID: <40A974DA.30704@comcast.net> Date: Mon, 17 May 2004 22:28:42 -0400 From: Gary Corcoran User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Xin LI References: <20040517174836.GA983@frontfree.net> <20040518021433.GA969@frontfree.net> In-Reply-To: <20040518021433.GA969@frontfree.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-fs@freebsd.org cc: Mikhail Teterin cc: Julian Elischer Subject: Re: QMail and SoftUpdates X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 02:26:09 -0000 Xin LI wrote: > On Mon, May 17, 2004 at 01:25:04PM -0700, Julian Elischer wrote: > [...] > >>Softupdates is NOT unsafe for this task IF the app does an fsync() >>before acknowldging the incoming mail. Fsync under Soft updates will not >>return until all data and metadata associated with the file >>has been written to disk. This will make the write as slow as a sync >>munted filesystem, but all other writes on the disk will proceeed at >>soft-updates speed. > > > Oh... I missed this point, sorry. Your statement is more accurate, thanks > for pointing this out :-) > > I think it should be noted that on ATA drives, the hardware writing > cache (without an acknowledge back to the operating system when the data > is actually written to the disk, like on a tagged queue enabled SCSI > disk), is enabled by default. This will greatly disturb SoftUpdates' > work and may lead to data loss even when the application is correctly > doing fsync(), because with ATA hardware writing cache, the disk will > "cheat" the opearting system - Before the data actually goes to disk, > it tells that it is, and data is lost if crash occours here. ^^^^^ Umm - shouldn't it be only if *power loss* occurs here? Even if the OS crashes, as long as power is supplied to the drive, its firmware should finish writing the data from its cache to the disk media, no? And therefore, as long as one has a stable power source, e.g. running off a UPS, there really isn't any great risk from on-drive write caches, is there? Gary