From owner-freebsd-hackers Mon Feb 26 14: 6: 0 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66]) by hub.freebsd.org (Postfix) with ESMTP id A17F237B491; Mon, 26 Feb 2001 14:05:57 -0800 (PST) (envelope-from nate@yogotech.com) Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.123.131]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id PAA04856; Mon, 26 Feb 2001 15:05:46 -0700 (MST) (envelope-from nate@nomad.yogotech.com) Received: (from nate@localhost) by nomad.yogotech.com (8.8.8/8.8.8) id PAA27291; Mon, 26 Feb 2001 15:05:45 -0700 (MST) (envelope-from nate) From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15002.54073.668155.728179@nomad.yogotech.com> Date: Mon, 26 Feb 2001 15:05:45 -0700 (MST) To: Marc W Cc: , , Drew Eckhardt , freebsd-hackers@FreeBSD.ORG Subject: Re: Is mkdir guaranteed to be 'atomic' ?? In-Reply-To: <200102262202.OAA39275@akira.lanfear.com> References: <200102262202.OAA39275@akira.lanfear.com> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > 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