Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Feb 2001 09:33:29 -0800 (PST)
From:      Matt Dillon <dillon@earth.backplane.com>
To:        Tony Finch <dot@dotat.at>
Cc:        Greg Black <gjb@gbch.net>, Andre Oppermann <oppermann@monzoon.net>, Rik van Riel <riel@conectiva.com.br>, Mike Silbersack <silby@silby.com>, Poul-Henning Kamp <phk@critter.freebsd.dk>, Charles Randall <crandall@matchlogic.com>, Dan Phoenix <dphoenix@bravenet.com>, Alfred Perlstein <bright@wintelcom.net>, Jos Backus <josb@cncdsl.com>, freebsd-hackers@FreeBSD.ORG, Tony Finch <dot@dotat.at>
Subject:   Re: soft updates and qmail (RE: qmail IO problems)
Message-ID:  <200102081733.f18HXTp07738@earth.backplane.com>
References:  <Pine.LNX.4.21.0102061555550.1535-100000@duckman.distro.conectiva> <3A805035.C71AAD5E@monzoon.net> <200102061943.f16Jhp365113@earth.backplane.com> <3A805938.96ED890D@monzoon.net> <20010207110208.G74296@hand.dotat.at> <nospam-3a813095860ab65@maxim.gbch.net> <20010208081542.M74296@hand.dotat.at>

next in thread | previous in thread | raw e-mail | index | archive | help
:>> already existing?
:>
:>Why not just read the man page for rename(2) before making
:>suggestions?
:
:I did. I'm glad I was right that it's deleting the destination that is
:the problem. I would have thought it would be easy to be sure that
:spool filenames are unique, but OTOH I guess that's not completely
:robust.
:
:Tony.
:-- 
:f.a.n.finch    fanf@covalent.net    dot@dotat.at

    Yes, rename() will 'delete' the destination file if it previously
    existed.  Of course, if the spool file names are unique then you
    are not in danger of deleting anything on the destination.

    If softupdates is turned on, rename() is 100% safe -- softupdates will
    guarentee that the file will exist in one directory or the other, and
    never get lost.  The absolute worst crash-case that can occur is for
    the file to wind up in both directories (as if a hardlink had been
    issued).  There is no need for a link() operation followed by a remove().

						-Matt



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102081733.f18HXTp07738>