linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* asynchronous locks for cluster exports
@ 2006-12-06  5:34 J. Bruce Fields
  2006-12-07 16:51 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 46+ messages in thread
From: J. Bruce Fields @ 2006-12-06  5:34 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: nfs, Marc Eshel

We'd like an asynchronous posix locking interface so that we can provide NFS
clients with cluster-coherent locking without blocking lockd while the
filesystem goes off and talks to other nodes.

So, here's one attempt.  It also includes an draft implementation of the
filesystem side for GFS2, which may well be wrong--it's not even tested
yet--but hopefully gives some idea what would be necessary.

A few points, among others, that I'm unsure of:

	- We added a new ->lock() export operation, figuring this was a feature
	  that only lockd and nfsd care about for now, and that we'd rather not
	  muck about with common locking code.  But the export operation is
	  pretty much identical to the file ->lock() operation; would it make
	  more sense to use that?

	- The filesystem returns the lock results to lockd using the
	  ->fl_notify() callback.  We add a few arguments to fl_notify() to
	  pass the results, and add a return value so the filesystem can
	  recognize the case where the callback comes after lockd has given up
	  waiting and returned an error to the user.  Presumably the filesystem
	  needs to have a way to cancel the lock in this case.  (Our GFS code
	  ignores this problem for now.)  Maybe it would be better to just poke
	  lockd when the result is ready and let it discover what happened by
	  retrying the original ->lock() call?  Or maybe we should use a
	  separate callback?

	- We're ignoring the blocking lock case for now under the assumption
	  it's always OK for lockd to return an immediate "denied" in that
	  case, then use the granted callback, even in cases where it doesn't
	  know for sure that there's a conflicting lock.

Thoughts?  Better ideas?

--b.

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

end of thread, other threads:[~2006-12-15 19:51 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-06  5:34 asynchronous locks for cluster exports J. Bruce Fields
2006-12-07 16:51 ` Christoph Hellwig
2006-12-14 22:51   ` J. Bruce Fields
     [not found] ` <8eb625184e6025f7f3d081dfe0a805abdd62a068.1165380892.git.bfields@citi.umich.edu>
2006-12-06  5:34   ` [PATCH 1/10] lockd: add new export operation for nfsv4/lockd locking J. Bruce Fields
2006-12-06  5:34   ` J. Bruce Fields
2006-12-09  5:53     ` Wendy Cheng
2006-12-10 18:31       ` J. Bruce Fields
     [not found]   ` <cc7b88076df17bb41ac5d536de174b44eda6b73c.1165380893.git.bfields@citi.umich.edu>
2006-12-06  5:34     ` [PATCH 2/10] nfsd4: Convert NFSv4 to new lock interface J. Bruce Fields
2006-12-06  5:34     ` J. Bruce Fields
     [not found]   ` <610c7d52f6363606200fa1016804e7116d580c36.1165380893.git.bfields@citi.umich.edu>
2006-12-06  5:34     ` [PATCH 3/10] lockd: request deferral routine J. Bruce Fields
2006-12-06  5:34     ` J. Bruce Fields
     [not found]   ` <665bfdae3a5b77bb7755f4735069b7188f815d89.1165380893.git.bfields@citi.umich.edu>
2006-12-06  5:34     ` [PATCH 4/10] locks: add fl_notify arguments J. Bruce Fields
2006-12-06  5:34     ` J. Bruce Fields
     [not found]   ` <e9e7fa0047137e5c988edaacc3dc70a84eb02efb.1165380893.git.bfields@citi.umich.edu>
2006-12-06  5:34     ` [PATCH 5/10] lockd: handle fl_notify callbacks J. Bruce Fields
2006-12-06  5:34     ` J. Bruce Fields
     [not found]   ` <b24eab1e47a44c1855d47d54b2858a7e5c2d4653.1165380893.git.bfields@citi.umich.edu>
2006-12-06  5:34     ` [PATCH 6/10] lockd: pass cookie in nlmsvc_testlock J. Bruce Fields
2006-12-06  5:34     ` J. Bruce Fields
     [not found]   ` <c214e0a0062abdbb72f0810c25ab7688e51b4dbd.1165380893.git.bfields@citi.umich.edu>
2006-12-06  5:34     ` [PATCH 7/10] lockd: handle test_lock deferrals J. Bruce Fields
2006-12-06  5:34     ` J. Bruce Fields
     [not found]   ` <aee338c430e7f0a9afe63ea80d0278b97b01eeee.1165380893.git.bfields@citi.umich.edu>
2006-12-06  5:34     ` [PATCH 8/10] lockd: always preallocate block in nlmsvc_lock() J. Bruce Fields
2006-12-06  5:34     ` J. Bruce Fields
     [not found]   ` <4fbe0004219a67cb6da4d1b3a1cfd16a9cb09ed7.1165380893.git.bfields@citi.umich.edu>
2006-12-06  5:34     ` [PATCH 9/10] lockd: add code to handle deferred lock requests J. Bruce Fields
2006-12-06  5:34     ` J. Bruce Fields
     [not found]   ` <70549752c06e54117024429649fd7aa813f21bec.1165380893.git.bfields@citi.umich.edu>
2006-12-06  5:34     ` [PATCH 10/10] gfs2: nfs lock support for gfs2 J. Bruce Fields
2006-12-06  6:00       ` [NFS] " Wendy Cheng
2006-12-06 13:26         ` Wendy Cheng
2006-12-06  5:34     ` J. Bruce Fields
2006-12-06 12:02     ` Steven Whitehouse
2006-12-06 15:49     ` David Teigland
2006-12-06 19:57       ` J. Bruce Fields
2006-12-06 20:08         ` [NFS] " J. Bruce Fields
2006-12-06 20:58         ` David Teigland
2006-12-06 21:23           ` J. Bruce Fields
2006-12-06 21:42             ` David Teigland
2006-12-06 22:00               ` [NFS] " J. Bruce Fields
2006-12-07 15:30                 ` David Teigland
2006-12-08 17:35                   ` [NFS] " J. Bruce Fields
2006-12-07  6:47           ` Marc Eshel
2006-12-07 15:23             ` J. Bruce Fields
2006-12-07 15:43               ` [NFS] " Marc Eshel
2006-12-07 16:21                 ` J. Bruce Fields
2006-12-07 18:52                   ` [NFS] " Trond Myklebust
2006-12-14 23:04   ` [PATCH 1/10] lockd: add new export operation for nfsv4/lockd locking J. Bruce Fields
2006-12-15  5:52     ` Marc Eshel
2006-12-15  7:40     ` Christoph Hellwig
2006-12-15 19:51 ` asynchronous locks for cluster exports J. Bruce Fields

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).