NFS in 2.1.130??

James Puckett (jpuckett@surfsouth.com)
Sun, 29 Nov 1998 11:23:55 -0500 (EST)


In man open(2), O_EXCL is said to be broken under NFS.

>From open(2):
When used with O_CREAT, if the file already exists it is an error and the open
will fail. O_EXCL is broken on NFS file systems, programs which rely on it for
performing locking tasks will contain a race condition. The solution for perform-
ing atomic file locking using a lockfile is to create a unique file on the same fs
(e.g., incorporating hostname and pid), use link(2) to make a link to the lockfile
and use stat(2) on the unique file to check if its link count has increased to 2.
Do not use the return value of the link() call.

Is this still the case?? What exactly is broken?

James Puckett
Director of Network Operations
Optilink Communications, Inc.
(912) 245-8100

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/