From owner-freebsd-hackers Tue Feb 6 9:52:51 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id D1F4437B4EC for ; Tue, 6 Feb 2001 09:52:29 -0800 (PST) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.11.1) with ESMTP id f16HhqB36090; Tue, 6 Feb 2001 18:43:52 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Matt Dillon Cc: Charles Randall , Dan Phoenix , Alfred Perlstein , Jos Backus , freebsd-hackers@FreeBSD.ORG Subject: Re: soft updates and qmail (RE: qmail IO problems) In-Reply-To: Your message of "Tue, 06 Feb 2001 09:39:24 PST." <200102061739.f16HdOB61963@earth.backplane.com> Date: Tue, 06 Feb 2001 18:43:52 +0100 Message-ID: <36088.981481432@critter> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200102061739.f16HdOB61963@earth.backplane.com>, Matt Dillon writes: > >: >:In message <5FE9B713CCCDD311A03400508B8B3013054E3F5D@bdr-xcln.is.matchlogic.com>, Charles Randall writes: >:>The qmail FAQ specifically recommends against soft updates for the mail >:>queue. >:> >:>http://cr.yp.to/qmail/faq/reliability.html#filesystems >:> >:>Is this incorrect? >:> >: >:It seems to indicate that qmail doesn't use fsync(2) as much as it should >:do. If that is true, then yes, softupdates would mean that a lot of things >:which qmail (mistakenly) think has been written are in fact not on the >:disk. >: >:-- >:Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 >:phk@FreeBSD.ORG | TCP/IP since RFC 956 >:FreeBSD committer | BSD since 4.3-tahoe >:Never attribute to malice what can adequately be explained by incompetence. > > QMail's FAQ is totally incorrect. No major filesystem -- be it > FFS, EX2FS, Reiser, FFS+Softupdates, guarentees that when you > write() and close() a file that the file will then survive a disk > crash. All these filesystems guarentee is that if a crash occurs, > when the system reboots the filesystems will be recovered into a > consistent state. Softupdates is considerably better at guarenteeing > this consistency (as is something like Reiser), but if you crash a > softupdates disk may wind up unwinding 'more' of the last few moments > worth of operations then a normal filesystem would. And, I might add, > Reiser is the same way. > > The only way to guarentee that file data is written to disk, with any > filesystem no matter how it is mounted (even sync mounted filesystems), > is by calling fsync(). > > So I would stick with softupdates. ... provided that qmail calls fsync(2). -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message