linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [NLM] fcntl(F_SETLKW) yields -ENOLCK when grace period expires.
@ 2011-08-04 10:30 Frank van Maarseveen
  2011-08-04 16:34 ` J. Bruce Fields
  0 siblings, 1 reply; 10+ messages in thread
From: Frank van Maarseveen @ 2011-08-04 10:30 UTC (permalink / raw)
  To: Linux NFS mailing list

Both client- and server run 2.6.39.3, NFSv3 over UDP (without the
relock_filesystem patch proposed earlier).

A second client has an exclusive lock on a file on the server. The
client under test calls fcntl(F_SETLKW) to wait for the same exclusive
lock. Wireshark sees NLM V4 LOCK calls resulting in NLM_BLOCKED.

Next the server is rebooted. The second client recovers the lock
correctly. The client under test now receives NLM_DENIED_GRACE_PERIOD for
every NLM V4 LOCK request resulting from the waiting fcntl(F_SETLKW). When
this changes to NLM_BLOCKED after grace period expiration the fcntl
returns -ENOLCK ("No locks available.") instead of continuing to wait.

server:/proc/locks shows two entries for the file after the -ENOLCK. When
the second client gives up its lock because the program running there
is killed one entry in server:/proc/locks remains indefinately: as a
result no NFS client can lock the file anymore.

-- 
Frank

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-03-16 10:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-04 10:30 [NLM] fcntl(F_SETLKW) yields -ENOLCK when grace period expires Frank van Maarseveen
2011-08-04 16:34 ` J. Bruce Fields
2011-08-04 16:43   ` Frank van Maarseveen
2011-08-04 16:49     ` J. Bruce Fields
2011-08-04 17:10       ` Trond Myklebust
2011-08-04 17:27         ` Frank van Maarseveen
2011-08-04 18:17           ` Trond Myklebust
2011-08-05 13:28             ` Frank van Maarseveen
2012-03-16 10:53               ` Ichiko Sakamoto
2011-08-04 17:24       ` Frank van Maarseveen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).