cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 1/4 Revised] NLM - drop per fsid locks
@ 2007-04-05 21:51 Wendy Cheng
  2007-04-09 18:49 ` [Cluster-devel] Re: [NFS] " Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Wendy Cheng @ 2007-04-05 21:51 UTC (permalink / raw)
  To: cluster-devel.redhat.com

By writing exported filesytem id into /proc/fs/nfsd/nlm_unlock, this 
patch walks thru lockd's global nlm_files list to release all the locks 
associated with the particular id. It is used to enable NFS lock 
failover with active-active clustered servers.

Relevant steps:
1) Exports filesystem with "fsid" option as:
  /etc/exports entry> /mnt/shared/exports *(fsid=1234,sync,rw)
2) Drops locks based on fsid by:
  shell> echo 1234 > /proc/fs/nfsd/nlm_unlock

-- Wendy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 001_nlm_drop_l.patch
Type: text/x-patch
Size: 8959 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070405/8cb075f0/attachment.bin>

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

* [Cluster-devel] Re: [NFS] [PATCH 1/4 Revised] NLM - drop per fsid locks
  2007-04-05 21:51 [Cluster-devel] [PATCH 1/4 Revised] NLM - drop per fsid locks Wendy Cheng
@ 2007-04-09 18:49 ` Christoph Hellwig
  2007-04-09 22:56   ` S. Wendy Cheng
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2007-04-09 18:49 UTC (permalink / raw)
  To: cluster-devel.redhat.com

On Thu, Apr 05, 2007 at 05:51:28PM -0400, Wendy Cheng wrote:
> By writing exported filesytem id into /proc/fs/nfsd/nlm_unlock, this 
> patch walks thru lockd's global nlm_files list to release all the locks 
> associated with the particular id. It is used to enable NFS lock 
> failover with active-active clustered servers.
> 
> Relevant steps:
> 1) Exports filesystem with "fsid" option as:
>  /etc/exports entry> /mnt/shared/exports *(fsid=1234,sync,rw)
> 2) Drops locks based on fsid by:
>  shell> echo 1234 > /proc/fs/nfsd/nlm_unlock

This is a very awkward API.  Dropping locks should support uuid or
dev_t based exports aswell.  Also it would be nice if you we had
a more general push api for changes to filesystem state, that works
on a similar basis as getting information from /etc/exports.


And please inline your patches into the mail I send, attaching them
makes it really hard to quote it in mail replies or even to simply read
it.




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

* [Cluster-devel] Re: [NFS] [PATCH 1/4 Revised] NLM - drop per fsid locks
  2007-04-09 18:49 ` [Cluster-devel] Re: [NFS] " Christoph Hellwig
@ 2007-04-09 22:56   ` S. Wendy Cheng
  0 siblings, 0 replies; 3+ messages in thread
From: S. Wendy Cheng @ 2007-04-09 22:56 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Christoph Hellwig wrote:
> On Thu, Apr 05, 2007 at 05:51:28PM -0400, Wendy Cheng wrote:
>   
>> By writing exported filesytem id into /proc/fs/nfsd/nlm_unlock, this 
>> patch walks thru lockd's global nlm_files list to release all the locks 
>> associated with the particular id. It is used to enable NFS lock 
>> failover with active-active clustered servers.
>>
>> Relevant steps:
>> 1) Exports filesystem with "fsid" option as:
>>  /etc/exports entry> /mnt/shared/exports *(fsid=1234,sync,rw)
>> 2) Drops locks based on fsid by:
>>  shell> echo 1234 > /proc/fs/nfsd/nlm_unlock
>>     
>
> This is a very awkward API.  Dropping locks should support uuid or
> dev_t based exports aswell.  Also it would be nice if you we had
> a more general push api for changes to filesystem state, that works
> on a similar basis as getting information from /etc/exports.
>   
These can be added as future enhancements. But be aware that:
1. The "dev_t" value may be an obvious thing for a kernel developer but 
not necessarily for admin(s) (human operator) or cluster script (that 
has to use extra steps to obtain it).
2. Device major and minor numbers can change between different servers 
(shared storage case) or between reboots. The "fsid" approach should be 
encouraged.
3. UUID is tied to disk partitions - an all-or-nothing approach, 
comparing to fsid that would allow cluster filesystem doing its load 
balancing (by
exporting different directories from different nodes)

On the other hand, lock dropping based on "uuid" or "dev_t" may be 
useful in a single server case though.
>
> And please inline your patches into the mail I send, attaching them
> makes it really hard to quote it in mail replies or even to simply read
> it. 
>   
I normally don't do much development works for community versions of 
linux kernel. Some of the "convention" is not clear to me. Will do it 
next time. But these patches tend to be quite large (in terms of line 
count).

-- Wendy



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

end of thread, other threads:[~2007-04-09 22:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-05 21:51 [Cluster-devel] [PATCH 1/4 Revised] NLM - drop per fsid locks Wendy Cheng
2007-04-09 18:49 ` [Cluster-devel] Re: [NFS] " Christoph Hellwig
2007-04-09 22:56   ` S. Wendy Cheng

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