Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Feb 2001 15:18:29 -0700
From:      Lyndon Nerenberg <lyndon@orthanc.ab.ca>
To:        seebs@plethora.net (Peter Seebach)
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Is mkdir guaranteed to be 'atomic' ?? 
Message-ID:  <200102262218.f1QMITq95167@orthanc.ab.ca>
In-Reply-To: Your message of "Mon, 26 Feb 2001 16:01:28 CST." <200102262201.f1QM1S620699@guild.plethora.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "Peter" == Peter Seebach <seebs@plethora.net> writes:

    Peter> Well, imagine a hypothetical broken system in which two
    Peter> simultaneous calls to mkdir, on some hypothetical broken
    Peter> filesystem, can each think that it "succeeded".  After all,
    Peter> at the end of the operation, the directory has been
    Peter> created, so who's to say they're wrong?  ;)

"They" are :-) What if the two processes issuing mkdir() have a
different effective [ug]id or umask? I.e. if I get success back I'm
going to assume I own the directory, which has a 1/n chance of being
wrong for for n processes with unique uids racing a non-atomic mkdir()
call over (say) NFS.

--lyndon

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?200102262218.f1QMITq95167>