home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / protocol / nfs / 1980 < prev    next >
Encoding:
Text File  |  1992-07-30  |  1.6 KB  |  44 lines

  1. Newsgroups: comp.protocols.nfs
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!ucla-cs!twinsun!eggert
  3. From: eggert@twinsun.com (Paul Eggert)
  4. Subject: Re: what locking techniques work over NFS?
  5. Message-ID: <biUZ?6$U@twinsun.com>
  6. Keywords: file locking
  7. Sender: usenet@twinsun.com
  8. Nntp-Posting-Host: farside
  9. Organization: Twin Sun, Inc
  10. References: <1992Jul30.021633.11818@philips.oz.au>
  11. Date: Fri, 31 Jul 1992 00:39:03 GMT
  12. Lines: 30
  13.  
  14. rod@philips.oz.au (Rod Roberts) writes:
  15.  
  16. >which of the following file locking techniques work with multiple hosts
  17. >accessing the same filesystem over NFS.
  18.  
  19. >1. lockf()  (System V)
  20. This works only if lockd works.  lockd's bugs are legendary.
  21.  
  22. >2. flock()  (BSD)
  23. This isn't even advertised to work.
  24.  
  25. >3. link()   (generic) fails if new link already exists
  26. This doesn't always work.  E.g. suppose a client finishes an operation
  27. and unlocks by issuing an unlink request, and suppose the unlink
  28. executes on the server, but the response is lost.  Eventually the
  29. client will retry the unlink request, and (assuming the idempotency cache
  30. overflows) the server will unlink the file again -- even if someone
  31. else has linked it in the meantime and is in the middle of an operation.
  32.  
  33. >4. create() (generic) fails if file exists and caller does no have write
  34. >             permission
  35. This doesn't always work, using a scenario similar to the above.
  36. Also, watch out if you're `root'.
  37.  
  38. >5. open()   (POSIX) fails if O_CREAT and O_EXCL flags are present an the file
  39. >             exists.
  40. This doesn't work; NFS has no notion of O_EXCL.
  41.  
  42.  
  43. They don't call it ``Not a File System'' for nothing.
  44.