From owner-freebsd-hackers Tue Feb 6 11:45:47 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mailtoaster1.pipeline.ch (mailtoaster1.pipeline.ch [62.48.0.70]) by hub.freebsd.org (Postfix) with SMTP id 61BF237B503 for ; Tue, 6 Feb 2001 11:45:28 -0800 (PST) Received: (qmail 12552 invoked from network); 6 Feb 2001 19:42:16 -0000 Received: from unknown (HELO monzoon.net) ([195.134.133.140]) (envelope-sender ) by mailtoaster1.pipeline.ch (qmail-ldap-1.03) with SMTP for ; 6 Feb 2001 19:42:16 -0000 Message-ID: <3A80540B.CFF35C0F@monzoon.net> Date: Tue, 06 Feb 2001 20:44:11 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.74 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Matt Dillon Cc: Mike Silbersack , Poul-Henning Kamp , Charles Randall , Dan Phoenix , Alfred Perlstein , Jos Backus , freebsd-hackers@FreeBSD.ORG Subject: Re: soft updates and qmail (RE: qmail IO problems) References: <200102061920.f16JKdN64467@earth.backplane.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matt Dillon wrote: > > :On Tue, 6 Feb 2001, Matt Dillon wrote: > : > :> I did a quick search of the qmail site but couldn't find an email > :> address to report the FAQ issue to. If QMail calls fsync() in a > :> reasonable manner, then softupdates is perfectly safe and the QMail > :> FAQ needs to be updated to recommend softupdates rather then > :> disrecommend it. > :> > :> -Matt > : > :The question still reamins about link/unlink/rename. Is a fsync of the > :directory necessary to ensure that they completed properly? As they take > :filenames instead of fds, an fsync after the operation seems > :non-intuitive. The rename manpage seems to imply that the operation is > :synchronous - the other two are ambiguous. > : > :Mike "Silby" Silbersack > > If you rename a file and then fsync() the file's descriptor, you > will guarentee the directory structure. Same with link. If you > you unlink a file and still have an open descriptor you can fsync() > the descriptor to guarentee the directory unlink. It might be a good > idea to ftruncate() the file to 0-length in addition to unlinking it, > prior to calling fsync(), to avoid unnecessary data block writes. Qmail has no need for guaranteed unlink()s. It only needs atomically link()s. > I've never tried fsync()ing a directory descriptor so I don't know > if that would work or not. This is neccessary for ext2 even in sychronous mount. > No other filesystem makes guarentees for these operations either. > Not even normal UFS mounts. -- Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message