Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Feb 2001 15:05:45 -0700 (MST)
From:      Nate Williams <nate@yogotech.com>
To:        Marc W <mwlist@lanfear.com>
Cc:        <owner-freebsd-hackers@FreeBSD.ORG>, <nate@yogotech.com>, Drew Eckhardt <drew@PoohSticks.ORG>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Is mkdir guaranteed to be 'atomic' ?? 
Message-ID:  <15002.54073.668155.728179@nomad.yogotech.com>
In-Reply-To: <200102262202.OAA39275@akira.lanfear.com>
References:  <200102262202.OAA39275@akira.lanfear.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> > >     I can handle it if there is a case where both fail, but is
> there a
> > > case where both can SUCCEED ?? 
> > 
> > What do you mean 'both succeed'?
> 
>     My understanding is that, on non-broken filesystems, calls to
> mkdir(2) either succeed by creating a new directory, or fail and return
> EEXIST (note: excluding all other types of errors :-))
> 
>     However, NFS seems to have issues, so the question is:  could both
> mkdir(2) calls actually succeed and claim to have created the same
> directory (even if it is?), or is one ALWAYS guaranteed to fail, as on
> a normal fs.

You're implying that you are making two calls to create the same
directory.  Am I correct?

The answer is 'maybe'?  Depends on the remote NFS server.  Matt or one
of the other NFS gurus may know more, but I wouldn't count on *anything*
over NFS.  If you need atomicity, you need lockd, which isn't
implemented on FreeBSD.


Nate

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?15002.54073.668155.728179>