From owner-freebsd-hackers Tue Feb 6 13: 8:41 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 3BDDD37B4EC for ; Tue, 6 Feb 2001 13:08:24 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f16L68U08880; Tue, 6 Feb 2001 13:06:08 -0800 (PST) Date: Tue, 6 Feb 2001 13:06:02 -0800 From: Alfred Perlstein To: Andre Oppermann Cc: Matt Dillon , Rik van Riel , Mike Silbersack , Poul-Henning Kamp , Charles Randall , Dan Phoenix , Jos Backus , freebsd-hackers@FreeBSD.ORG Subject: Re: soft updates and qmail (RE: qmail IO problems) Message-ID: <20010206130602.X26076@fw.wintelcom.net> References: <3A805035.C71AAD5E@monzoon.net> <200102061943.f16Jhp365113@earth.backplane.com> <3A805938.96ED890D@monzoon.net> <20010206121357.S26076@fw.wintelcom.net> <3A805F53.F5CD60D9@monzoon.net> <20010206124012.V26076@fw.wintelcom.net> <3A80650D.9FA0BCDA@monzoon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3A80650D.9FA0BCDA@monzoon.net>; from oppermann@monzoon.net on Tue, Feb 06, 2001 at 09:56:45PM +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Andre Oppermann [010206 12:58] wrote: > Alfred Perlstein wrote: > > > > Basically, you want a fsync right before the IPC. This should > > bring the metadata up to date with what's in-core and you should > > then be safe when you reply with your 250 accepted message. > > Like this (from qmail-queue): > > ... > if (fsync(intdfd) == -1) die_write(); > > if (link(intdfn,todofn) == -1) die(66); > > triggerpull(); > die(0); > } > > Actually for initial queueing it doesn't even unlink() but leaves > it to the next program. Can't be more safe, can it? Only if you don't need the link() to exist after a crash. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message