cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 1/2] NLM failover unlock commands
@ 2008-01-07  5:39 Wendy Cheng
       [not found] ` <message from Wendy Cheng on Monday January 7>
  2008-01-08 17:02 ` [Cluster-devel] Re: [PATCH 1/2] NLM failover unlock commands Christoph Hellwig
  0 siblings, 2 replies; 57+ messages in thread
From: Wendy Cheng @ 2008-01-07  5:39 UTC (permalink / raw)
  To: cluster-devel.redhat.com

We've implemented two new NFSD procfs files:

o /proc/fs/nfsd/unlock_ip
o /proc/fs/nfsd/unlock_filesystem

They are intended to allow admin or user mode script to release NLM 
locks based on either a path name or a server in-bound ip address (ipv4 
for now)
as;

shell> echo 10.1.1.2 > /proc/fs/nfsd/unlock_ip
shell> echo /mnt/sfs1 > /proc/fs/nfsd/unlock_filesystem

The expected usage is for High Availability (HA) environment where nfs 
servers are clustered together to provide either load balancing or take 
over upon server failure. The task is normally started by transferring a 
floating IP address from serverA to serverB with the following sequences:

ServerA:
1. Tear down the IP address
2. Unexport the path
3. Write IP to /proc/fs/nfsd/unlock_ip to unlock files
4. If unmount required,
      write path name to /proc/fs/nfsd/unlock_filesystem, then unmount.
5. Signal peer to begin take-over.

For details, check out:
http://people.redhat.com/wcheng/Patches/NFS/NLM/004.txt

Acknowledgment goes to Neil Brown who has been offered support and 
guidance during our prototype efforts.

-- Wendy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: unlock_001.patch
Type: text/x-patch
Size: 11591 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20080107/5c32265e/attachment.bin>

^ permalink raw reply	[flat|nested] 57+ messages in thread
* [Cluster-devel] [PATCH 2/2] Fix lockd panic
@ 2008-01-07  5:53 Wendy Cheng
  0 siblings, 0 replies; 57+ messages in thread
From: Wendy Cheng @ 2008-01-07  5:53 UTC (permalink / raw)
  To: cluster-devel.redhat.com

This small patch has not been changed since our last discussion:
http://www.opensubscriber.com/message/nfs at lists.sourceforge.net/6348912.html

To recap the issue, a client could ask for a posix lock that invokes:

 >>>     server calls nlm4svc_proc_lock() ->
 >>>         * server lookup file (f_count++)
 >>>         * server lock the file
 >>>         * server calls nlm_release_host
 >>>         * server calls nlm_release_file (f_count--)
 >>>         * server return to client with status 0
 >>>

As part of the lookup file, the lock stays on vfs inode->i_flock list 
with zero f_count. Any call into nlm_traverse_files() will BUG() in 
locks_remove_flock() (fs/locks.c:2034) during fclose(), if that file 
happens to be of no interest to that particular search. Since after 
nlm_inspect_file(), the logic unconditionally checks for possible 
removing of the file. As the file is not blocked, nothing to do with 
shares, and f_count is zero, it will get removed from hash and fclose() 
invoked with the posix lock hanging on i_flock list.

-- Wendy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: unlock_002.patch
Type: text/x-patch
Size: 939 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20080107/7dc95a17/attachment.bin>

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

end of thread, other threads:[~2008-01-28 17:06 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-07  5:39 [Cluster-devel] [PATCH 1/2] NLM failover unlock commands Wendy Cheng
     [not found] ` <message from Wendy Cheng on Monday January 7>
2008-01-08  5:18   ` [Cluster-devel] " Neil Brown
2008-01-09  2:51     ` Wendy Cheng
2008-01-08  5:31   ` [Cluster-devel] Re: [PATCH 2/2] Fix lockd panic Neil Brown
2008-01-09  3:02     ` Wendy Cheng
2008-01-09  4:43       ` Wendy Cheng
2008-01-09 23:33         ` Wendy Cheng
2008-01-12  6:51           ` Wendy Cheng
2008-01-08 17:02 ` [Cluster-devel] Re: [PATCH 1/2] NLM failover unlock commands Christoph Hellwig
2008-01-08 17:49   ` Christoph Hellwig
2008-01-08 20:57     ` Wendy Cheng
2008-01-09 18:02       ` Christoph Hellwig
2008-01-10  7:59         ` Christoph Hellwig
2008-01-12  7:03           ` Wendy Cheng
2008-01-12  9:38             ` Christoph Hellwig
2008-01-14 23:07             ` J. Bruce Fields
     [not found]               ` <message from J. Bruce Fields on Monday January 14>
2008-01-14 23:31                 ` Neil Brown
2008-01-22 22:53                   ` J. Bruce Fields
     [not found]                     ` <message from J. Bruce Fields on Tuesday January 22>
2008-01-24  4:02                       ` Neil Brown
2008-01-15 16:14               ` Wendy Cheng
2008-01-15 16:30                 ` J. Bruce Fields
     [not found]             ` <message from Wendy Cheng on Saturday January 12>
2008-01-14 23:52               ` Neil Brown
2008-01-15 20:17                 ` Wendy Cheng
     [not found]                   ` <message from Wendy Cheng on Tuesday January 15>
2008-01-15 20:50                     ` Neil Brown
2008-01-15 20:56                       ` Wendy Cheng
2008-01-15 22:48                       ` Wendy Cheng
2008-01-17 15:10                         ` J. Bruce Fields
2008-01-17 15:48                           ` Wendy Cheng
2008-01-17 16:08                             ` Wendy Cheng
2008-01-17 16:10                               ` Wendy Cheng
2008-01-18 10:21                                 ` Frank van Maarseveen
2008-01-18 15:00                                   ` Wendy Cheng
2008-01-17 16:14                             ` J. Bruce Fields
2008-01-17 16:17                               ` Wendy Cheng
2008-01-17 16:21                                 ` J. Bruce Fields
2008-01-17 16:31                             ` J. Bruce Fields
2008-01-17 16:31                               ` Wendy Cheng
2008-01-17 16:40                                 ` J. Bruce Fields
     [not found]                                   ` <1200591323.13670.34.camel@dyn9047022153>
2008-01-17 17:59                                     ` Wendy Cheng
2008-01-17 18:07                                   ` Wendy Cheng
2008-01-17 20:23                                     ` J. Bruce Fields
2008-01-18 10:03                                       ` Frank van Maarseveen
2008-01-18 14:56                                         ` Wendy Cheng
2008-01-24 16:00                                       ` J. Bruce Fields
     [not found]                                         ` <4798BAAE.6090107@redhat.com>
2008-01-24 16:39                                           ` J. Bruce Fields
2008-01-24 19:45                                         ` Wendy Cheng
2008-01-24 20:19                                           ` J. Bruce Fields
2008-01-24 21:06                                             ` Wendy Cheng
2008-01-24 21:40                                               ` J. Bruce Fields
2008-01-24 21:49                                                 ` Wendy Cheng
2008-01-28  3:46                                         ` Felix Blyakher
2008-01-28 15:56                                           ` Wendy Cheng
2008-01-28 17:06                                             ` Felix Blyakher
2008-01-16  4:19                     ` Neil Brown
2008-01-09  3:49   ` Wendy Cheng
2008-01-09 16:13     ` J. Bruce Fields
  -- strict thread matches above, loose matches on Subject: below --
2008-01-07  5:53 [Cluster-devel] [PATCH 2/2] Fix lockd panic 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).