All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <4508DE13.6030705@redhat.com>

diff --git a/a/1.txt b/N1/1.txt
index 2a1c4c0..e0d2866 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -19,11 +19,3 @@ Signed-off-by: Lon Hohberger  <lhh@redhat.com>
  include/linux/lockd/lockd.h |    2 +
  include/linux/nfsd/debug.h  |    1
  5 files changed, 124 insertions(+), 5 deletions(-)
-
--------------- next part --------------
-A non-text attachment was scrubbed...
-Name: gfs_nlm_unlock.patch
-Type: text/x-patch
-Size: 7662 bytes
-Desc: not available
-URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20060914/f136d21c/attachment.bin>
diff --git a/N1/2.hdr b/N1/2.hdr
new file mode 100644
index 0000000..2191322
--- /dev/null
+++ b/N1/2.hdr
@@ -0,0 +1,5 @@
+Content-Type: text/x-patch;
+ name="gfs_nlm_unlock.patch"
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline;
+ filename="gfs_nlm_unlock.patch"
diff --git a/N1/2.txt b/N1/2.txt
new file mode 100644
index 0000000..21c3582
--- /dev/null
+++ b/N1/2.txt
@@ -0,0 +1,264 @@
+--- linux-0/include/linux/lockd/lockd.h	2006-09-03 21:06:18.000000000 -0400
++++ linux-1/include/linux/lockd/lockd.h	2006-09-03 21:51:41.000000000 -0400
+@@ -132,6 +132,7 @@ struct nlm_block {
+ #define NLM_ACT_CHECK		0		/* check for locks */
+ #define NLM_ACT_MARK		1		/* mark & sweep */
+ #define NLM_ACT_UNLOCK		2		/* release all locks */
++#define NLM_ACT_FO_UNLOCK	3		/* failover release locks */
+ 
+ /*
+  * Global variables
+@@ -195,6 +196,7 @@ void		  nlm_release_file(struct nlm_file
+ void		  nlmsvc_mark_resources(void);
+ void		  nlmsvc_free_host_resources(struct nlm_host *);
+ void		  nlmsvc_invalidate_all(void);
++int 		  nlmsvc_fo_unlock(int *fsid);
+ 
+ static __inline__ struct inode *
+ nlmsvc_file_inode(struct nlm_file *file)
+--- linux-0/fs/lockd/svcsubs.c	2006-09-03 21:06:17.000000000 -0400
++++ linux-1/fs/lockd/svcsubs.c	2006-09-13 13:48:01.000000000 -0400
+@@ -19,6 +19,8 @@
+ #include <linux/lockd/share.h>
+ #include <linux/lockd/sm_inter.h>
+ 
++#include <linux/module.h>
++
+ #define NLMDBG_FACILITY		NLMDBG_SVCSUBS
+ 
+ 
+@@ -214,6 +216,37 @@ again:
+ }
+ 
+ /*
++ * Get fsid from nfs_fh:
++ * return 1 if *fsid contains a valid value.
++ */
++static inline int
++nlm_fo_get_fsid(struct nfs_fh *fh, int *fsid)
++{
++	struct nfs_fhbase_new *fh_base = (struct nfs_fhbase_new *) fh->data;
++ 	int data_left = fh->size/4;
++ 
++ 	nlm_debug_print_fh("nlm_fo_find_fsid", fh);
++ 
++ 	/* From fb_version to fb_auth - at least two u32 */
++ 	if (data_left < 2)		
++ 		return 0;
++  
++ 	/* For various types, check out 
++ 	 * inlcude/linux/nfsd/nfsfsh.h
++ 	 */
++ 	if ((fh_base->fb_version != 1) ||  
++ 		(fh_base->fb_auth_type != 0) ||
++ 		(fh_base->fb_fsid_type != 1))
++ 		return 0;
++ 
++ 	/* The fb_auth is 0 bytes long - imply fb_auth[0] has
++ 	 * fsid value.
++ 	 */
++ 	*fsid = (int) fh_base->fb_auth[0];
++ 	return 1;
++}
++
++/*
+  * Operate on a single file
+  */
+ static inline int
+@@ -234,21 +267,42 @@ nlm_inspect_file(struct nlm_host *host, 
+  * Loop over all files in the file table.
+  */
+ static int
+-nlm_traverse_files(struct nlm_host *host, int action)
++nlm_traverse_files(struct nlm_host *host, int *fsidp, int action)
+ {
+ 	struct nlm_file	*file, **fp;
+-	int i, ret = 0;
++	int i, ret = 0, found, fsid_in=0, fsid, act=action;
+ 
+ 	mutex_lock(&nlm_file_mutex);
++	if (unlikely(action == NLM_ACT_FO_UNLOCK)) {
++		BUG_ON(fsidp == NULL);
++		fsid_in = *fsidp;
++	}
+ 	for (i = 0; i < FILE_NRHASH; i++) {
+ 		fp = nlm_files + i;
+ 		while ((file = *fp) != NULL) {
+ 			file->f_count++;
+ 			mutex_unlock(&nlm_file_mutex);
+ 
++			/*
++ 		 	 * NLM lock failover:
++ 		 	 *      Upon NLM_ACT_FO_UNLOCK, obtain fsid from
++ 		 	 *      f_handle. If match is found, the lock will 
++ 			 *	be released via NLM_ACT_UNLOCK.
++ 		 	 */
++ 			if (unlikely(action == NLM_ACT_FO_UNLOCK)) {
++ 				found = nlm_fo_get_fsid(&file->f_handle, &fsid);
++ 				if (!found || (fsid != fsid_in)) {
++ 					fp = &file->f_next;
++ 					continue;
++ 				}
++ 				dprintk("lockd: drop lock file=%p fsid=%d\n", 
++ 					 file, fsid);
++ 				act  = NLM_ACT_UNLOCK;
++ 			}
++
+ 			/* Traverse locks, blocks and shares of this file
+ 			 * and update file->f_locks count */
+-			if (nlm_inspect_file(host, file, action))
++			if (nlm_inspect_file(host, file, act))
+ 				ret = 1;
+ 
+ 			mutex_lock(&nlm_file_mutex);
+@@ -256,6 +310,8 @@ nlm_traverse_files(struct nlm_host *host
+ 			/* No more references to this file. Let go of it. */
+ 			if (!file->f_blocks && !file->f_locks
+ 			 && !file->f_shares && !file->f_count) {
++				dprintk("lockd: fo_unlock close file=%p\n", 
++					 file);
+ 				*fp = file->f_next;
+ 				nlmsvc_ops->fclose(file->f_file);
+ 				kfree(file);
+@@ -303,7 +359,7 @@ nlmsvc_mark_resources(void)
+ {
+ 	dprintk("lockd: nlmsvc_mark_resources\n");
+ 
+-	nlm_traverse_files(NULL, NLM_ACT_MARK);
++	nlm_traverse_files(NULL, NULL, NLM_ACT_MARK);
+ }
+ 
+ /*
+@@ -314,7 +370,7 @@ nlmsvc_free_host_resources(struct nlm_ho
+ {
+ 	dprintk("lockd: nlmsvc_free_host_resources\n");
+ 
+-	if (nlm_traverse_files(host, NLM_ACT_UNLOCK))
++	if (nlm_traverse_files(host, NULL, NLM_ACT_UNLOCK))
+ 		printk(KERN_WARNING
+ 			"lockd: couldn't remove all locks held by %s",
+ 			host->h_name);
+@@ -334,3 +390,16 @@ nlmsvc_invalidate_all(void)
+ 		nlm_release_host(host);
+ 	}
+ }
++
++EXPORT_SYMBOL(nlmsvc_fo_unlock);
++
++/*
++ * release locks associated with an export fsid upon failover
++ */
++int
++nlmsvc_fo_unlock(int *fsid)
++{
++	/* drop the locks */
++	return (nlm_traverse_files(NULL, fsid, NLM_ACT_FO_UNLOCK)); 
++}
++
+--- linux-0/include/linux/lockd/bind.h	2006-09-03 21:06:18.000000000 -0400
++++ linux-1/include/linux/lockd/bind.h	2006-09-03 21:51:41.000000000 -0400
+@@ -33,4 +33,9 @@ extern int	nlmclnt_proc(struct inode *, 
+ extern int	lockd_up(void);
+ extern void	lockd_down(void);
+ 
++/*
++ * NLM failover
++ */
++extern int     nlmsvc_fo_unlock(int *fsid);
++
+ #endif /* LINUX_LOCKD_BIND_H */
+--- linux-0/fs/nfsd/nfsctl.c	2006-09-03 21:06:17.000000000 -0400
++++ linux-1/fs/nfsd/nfsctl.c	2006-09-03 21:51:40.000000000 -0400
+@@ -33,6 +33,10 @@
+ #include <linux/nfsd/syscall.h>
+ #include <linux/nfsd/interface.h>
+ 
++/* nlm failover */
++#include <linux/in.h>
++#include <linux/lockd/bind.h>
++
+ #include <asm/uaccess.h>
+ 
+ unsigned int nfsd_versbits = ~0;
+@@ -51,6 +55,7 @@ enum {
+ 	NFSD_Getfs,
+ 	NFSD_List,
+ 	NFSD_Fh,
++	NFSD_NlmUnlock,
+ 	NFSD_Threads,
+ 	NFSD_Versions,
+ 	/*
+@@ -81,6 +86,14 @@ static ssize_t write_leasetime(struct fi
+ static ssize_t write_recoverydir(struct file *file, char *buf, size_t size);
+ #endif
+ 
++/*
++ * NLM lock failover
++ */
++
++#define NFSDDBG_FACILITY	NFSDDBG_CLUSTER
++
++static ssize_t write_fo_unlock(struct file *file, char *buf, size_t size);
++
+ static ssize_t (*write_op[])(struct file *, char *, size_t) = {
+ 	[NFSD_Svc] = write_svc,
+ 	[NFSD_Add] = write_add,
+@@ -90,6 +103,7 @@ static ssize_t (*write_op[])(struct file
+ 	[NFSD_Getfd] = write_getfd,
+ 	[NFSD_Getfs] = write_getfs,
+ 	[NFSD_Fh] = write_filehandle,
++	[NFSD_NlmUnlock] = write_fo_unlock,
+ 	[NFSD_Threads] = write_threads,
+ 	[NFSD_Versions] = write_versions,
+ #ifdef CONFIG_NFSD_V4
+@@ -334,6 +348,33 @@ static ssize_t write_filehandle(struct f
+ 	return mesg - buf;	
+ }
+ 
++static ssize_t write_fo_unlock(struct file *file, char *buf, size_t size)
++{
++	char *mesg = buf;
++	int fsid, rc;
++
++	if (size <= 0) return -EINVAL;
++
++	/* convert string into a valid fsid */
++	rc = get_int(&mesg, &fsid);
++	if (rc) {
++		dprintk("nfsd: write_fo_unlock invalid fsid(%s)\n", buf);
++		return rc;
++	}
++
++	/* call nlm to release the locks - fsid is passed by reference 
++	 * to allow other routine uses NULL pointer. */
++	rc = nlmsvc_fo_unlock(&fsid);
++	if (rc) {
++		dprintk("nfsd: nlmsvc_fo_unlock return rc=%d\n", rc);
++		return rc;
++	}
++
++	/* done */
++	sprintf(buf, "nlm_fo fsid=%d released locks\n", fsid);
++	return strlen(buf);
++}
++
+ extern int nfsd_nrthreads(void);
+ 
+ static ssize_t write_threads(struct file *file, char *buf, size_t size)
+@@ -482,6 +523,7 @@ static int nfsd_fill_super(struct super_
+ 		[NFSD_Getfs] = {".getfs", &transaction_ops, S_IWUSR|S_IRUSR},
+ 		[NFSD_List] = {"exports", &exports_operations, S_IRUGO},
+ 		[NFSD_Fh] = {"filehandle", &transaction_ops, S_IWUSR|S_IRUSR},
++		[NFSD_NlmUnlock] = {"nlm_unlock", &transaction_ops, S_IWUSR|S_IRUSR},
+ 		[NFSD_Threads] = {"threads", &transaction_ops, S_IWUSR|S_IRUSR},
+ 		[NFSD_Versions] = {"versions", &transaction_ops, S_IWUSR|S_IRUSR},
+ #ifdef CONFIG_NFSD_V4
+--- linux-0/include/linux/nfsd/debug.h	2006-09-03 21:06:18.000000000 -0400
++++ linux-1/include/linux/nfsd/debug.h	2006-09-03 21:51:41.000000000 -0400
+@@ -32,6 +32,7 @@
+ #define NFSDDBG_REPCACHE	0x0080
+ #define NFSDDBG_XDR		0x0100
+ #define NFSDDBG_LOCKD		0x0200
++#define NFSDDBG_CLUSTER 	0x0400
+ #define NFSDDBG_ALL		0x7FFF
+ #define NFSDDBG_NOCHANGE	0xFFFF
diff --git a/N1/3.hdr b/N1/3.hdr
new file mode 100644
index 0000000..4b86001
--- /dev/null
+++ b/N1/3.hdr
@@ -0,0 +1,4 @@
+Content-Type: text/plain; charset="us-ascii"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline
diff --git a/N1/3.txt b/N1/3.txt
new file mode 100644
index 0000000..b5ca0c1
--- /dev/null
+++ b/N1/3.txt
@@ -0,0 +1,5 @@
+-------------------------------------------------------------------------
+Using Tomcat but need to do more? Need to support web services, security?
+Get stuff done quickly with pre-integrated technology to make your job easier
+Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
+http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
diff --git a/N1/4.hdr b/N1/4.hdr
new file mode 100644
index 0000000..4b86001
--- /dev/null
+++ b/N1/4.hdr
@@ -0,0 +1,4 @@
+Content-Type: text/plain; charset="us-ascii"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline
diff --git a/N1/4.txt b/N1/4.txt
new file mode 100644
index 0000000..5264bf8
--- /dev/null
+++ b/N1/4.txt
@@ -0,0 +1,3 @@
+_______________________________________________
+NFS maillist  -  NFS@lists.sourceforge.net
+https://lists.sourceforge.net/lists/listinfo/nfs
diff --git a/a/content_digest b/N1/content_digest
index 594269f..6e23af6 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,8 +1,10 @@
  "From\0Wendy Cheng <wcheng@redhat.com>\0"
- "Subject\0[Cluster-devel] [PATCH 1/4 Revised] NLM failover - nlm_unlock\0"
+ "Subject\0[PATCH 1/4 Revised] NLM failover - nlm_unlock\0"
  "Date\0Thu, 14 Sep 2006 00:44:03 -0400\0"
- "To\0cluster-devel.redhat.com\0"
- "\00:1\0"
+ "To\0nfs@lists.sourceforge.net"
+ " cluster-devel@redhat.com\0"
+ "Cc\0lhh@redhat.com\0"
+ "\01:1\0"
  "b\0"
  "By writing exported filesytem id into /proc/fs/nfsd/nlm_unlock, this \n"
  "patch walks thru lockd's global nlm_files list to release all the locks \n"
@@ -24,14 +26,285 @@
  " include/linux/lockd/bind.h  |    5 ++\n"
  " include/linux/lockd/lockd.h |    2 +\n"
  " include/linux/nfsd/debug.h  |    1\n"
- " 5 files changed, 124 insertions(+), 5 deletions(-)\n"
- "\n"
- "-------------- next part --------------\n"
- "A non-text attachment was scrubbed...\n"
- "Name: gfs_nlm_unlock.patch\n"
- "Type: text/x-patch\n"
- "Size: 7662 bytes\n"
- "Desc: not available\n"
- URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20060914/f136d21c/attachment.bin>
+  5 files changed, 124 insertions(+), 5 deletions(-)
+ "\01:2\0"
+ "fn\0gfs_nlm_unlock.patch\0"
+ "b\0"
+ "--- linux-0/include/linux/lockd/lockd.h\t2006-09-03 21:06:18.000000000 -0400\n"
+ "+++ linux-1/include/linux/lockd/lockd.h\t2006-09-03 21:51:41.000000000 -0400\n"
+ "@@ -132,6 +132,7 @@ struct nlm_block {\n"
+ " #define NLM_ACT_CHECK\t\t0\t\t/* check for locks */\n"
+ " #define NLM_ACT_MARK\t\t1\t\t/* mark & sweep */\n"
+ " #define NLM_ACT_UNLOCK\t\t2\t\t/* release all locks */\n"
+ "+#define NLM_ACT_FO_UNLOCK\t3\t\t/* failover release locks */\n"
+ " \n"
+ " /*\n"
+ "  * Global variables\n"
+ "@@ -195,6 +196,7 @@ void\t\t  nlm_release_file(struct nlm_file\n"
+ " void\t\t  nlmsvc_mark_resources(void);\n"
+ " void\t\t  nlmsvc_free_host_resources(struct nlm_host *);\n"
+ " void\t\t  nlmsvc_invalidate_all(void);\n"
+ "+int \t\t  nlmsvc_fo_unlock(int *fsid);\n"
+ " \n"
+ " static __inline__ struct inode *\n"
+ " nlmsvc_file_inode(struct nlm_file *file)\n"
+ "--- linux-0/fs/lockd/svcsubs.c\t2006-09-03 21:06:17.000000000 -0400\n"
+ "+++ linux-1/fs/lockd/svcsubs.c\t2006-09-13 13:48:01.000000000 -0400\n"
+ "@@ -19,6 +19,8 @@\n"
+ " #include <linux/lockd/share.h>\n"
+ " #include <linux/lockd/sm_inter.h>\n"
+ " \n"
+ "+#include <linux/module.h>\n"
+ "+\n"
+ " #define NLMDBG_FACILITY\t\tNLMDBG_SVCSUBS\n"
+ " \n"
+ " \n"
+ "@@ -214,6 +216,37 @@ again:\n"
+ " }\n"
+ " \n"
+ " /*\n"
+ "+ * Get fsid from nfs_fh:\n"
+ "+ * return 1 if *fsid contains a valid value.\n"
+ "+ */\n"
+ "+static inline int\n"
+ "+nlm_fo_get_fsid(struct nfs_fh *fh, int *fsid)\n"
+ "+{\n"
+ "+\tstruct nfs_fhbase_new *fh_base = (struct nfs_fhbase_new *) fh->data;\n"
+ "+ \tint data_left = fh->size/4;\n"
+ "+ \n"
+ "+ \tnlm_debug_print_fh(\"nlm_fo_find_fsid\", fh);\n"
+ "+ \n"
+ "+ \t/* From fb_version to fb_auth - at least two u32 */\n"
+ "+ \tif (data_left < 2)\t\t\n"
+ "+ \t\treturn 0;\n"
+ "+  \n"
+ "+ \t/* For various types, check out \n"
+ "+ \t * inlcude/linux/nfsd/nfsfsh.h\n"
+ "+ \t */\n"
+ "+ \tif ((fh_base->fb_version != 1) ||  \n"
+ "+ \t\t(fh_base->fb_auth_type != 0) ||\n"
+ "+ \t\t(fh_base->fb_fsid_type != 1))\n"
+ "+ \t\treturn 0;\n"
+ "+ \n"
+ "+ \t/* The fb_auth is 0 bytes long - imply fb_auth[0] has\n"
+ "+ \t * fsid value.\n"
+ "+ \t */\n"
+ "+ \t*fsid = (int) fh_base->fb_auth[0];\n"
+ "+ \treturn 1;\n"
+ "+}\n"
+ "+\n"
+ "+/*\n"
+ "  * Operate on a single file\n"
+ "  */\n"
+ " static inline int\n"
+ "@@ -234,21 +267,42 @@ nlm_inspect_file(struct nlm_host *host, \n"
+ "  * Loop over all files in the file table.\n"
+ "  */\n"
+ " static int\n"
+ "-nlm_traverse_files(struct nlm_host *host, int action)\n"
+ "+nlm_traverse_files(struct nlm_host *host, int *fsidp, int action)\n"
+ " {\n"
+ " \tstruct nlm_file\t*file, **fp;\n"
+ "-\tint i, ret = 0;\n"
+ "+\tint i, ret = 0, found, fsid_in=0, fsid, act=action;\n"
+ " \n"
+ " \tmutex_lock(&nlm_file_mutex);\n"
+ "+\tif (unlikely(action == NLM_ACT_FO_UNLOCK)) {\n"
+ "+\t\tBUG_ON(fsidp == NULL);\n"
+ "+\t\tfsid_in = *fsidp;\n"
+ "+\t}\n"
+ " \tfor (i = 0; i < FILE_NRHASH; i++) {\n"
+ " \t\tfp = nlm_files + i;\n"
+ " \t\twhile ((file = *fp) != NULL) {\n"
+ " \t\t\tfile->f_count++;\n"
+ " \t\t\tmutex_unlock(&nlm_file_mutex);\n"
+ " \n"
+ "+\t\t\t/*\n"
+ "+ \t\t \t * NLM lock failover:\n"
+ "+ \t\t \t *      Upon NLM_ACT_FO_UNLOCK, obtain fsid from\n"
+ "+ \t\t \t *      f_handle. If match is found, the lock will \n"
+ "+ \t\t\t *\tbe released via NLM_ACT_UNLOCK.\n"
+ "+ \t\t \t */\n"
+ "+ \t\t\tif (unlikely(action == NLM_ACT_FO_UNLOCK)) {\n"
+ "+ \t\t\t\tfound = nlm_fo_get_fsid(&file->f_handle, &fsid);\n"
+ "+ \t\t\t\tif (!found || (fsid != fsid_in)) {\n"
+ "+ \t\t\t\t\tfp = &file->f_next;\n"
+ "+ \t\t\t\t\tcontinue;\n"
+ "+ \t\t\t\t}\n"
+ "+ \t\t\t\tdprintk(\"lockd: drop lock file=%p fsid=%d\\n\", \n"
+ "+ \t\t\t\t\t file, fsid);\n"
+ "+ \t\t\t\tact  = NLM_ACT_UNLOCK;\n"
+ "+ \t\t\t}\n"
+ "+\n"
+ " \t\t\t/* Traverse locks, blocks and shares of this file\n"
+ " \t\t\t * and update file->f_locks count */\n"
+ "-\t\t\tif (nlm_inspect_file(host, file, action))\n"
+ "+\t\t\tif (nlm_inspect_file(host, file, act))\n"
+ " \t\t\t\tret = 1;\n"
+ " \n"
+ " \t\t\tmutex_lock(&nlm_file_mutex);\n"
+ "@@ -256,6 +310,8 @@ nlm_traverse_files(struct nlm_host *host\n"
+ " \t\t\t/* No more references to this file. Let go of it. */\n"
+ " \t\t\tif (!file->f_blocks && !file->f_locks\n"
+ " \t\t\t && !file->f_shares && !file->f_count) {\n"
+ "+\t\t\t\tdprintk(\"lockd: fo_unlock close file=%p\\n\", \n"
+ "+\t\t\t\t\t file);\n"
+ " \t\t\t\t*fp = file->f_next;\n"
+ " \t\t\t\tnlmsvc_ops->fclose(file->f_file);\n"
+ " \t\t\t\tkfree(file);\n"
+ "@@ -303,7 +359,7 @@ nlmsvc_mark_resources(void)\n"
+ " {\n"
+ " \tdprintk(\"lockd: nlmsvc_mark_resources\\n\");\n"
+ " \n"
+ "-\tnlm_traverse_files(NULL, NLM_ACT_MARK);\n"
+ "+\tnlm_traverse_files(NULL, NULL, NLM_ACT_MARK);\n"
+ " }\n"
+ " \n"
+ " /*\n"
+ "@@ -314,7 +370,7 @@ nlmsvc_free_host_resources(struct nlm_ho\n"
+ " {\n"
+ " \tdprintk(\"lockd: nlmsvc_free_host_resources\\n\");\n"
+ " \n"
+ "-\tif (nlm_traverse_files(host, NLM_ACT_UNLOCK))\n"
+ "+\tif (nlm_traverse_files(host, NULL, NLM_ACT_UNLOCK))\n"
+ " \t\tprintk(KERN_WARNING\n"
+ " \t\t\t\"lockd: couldn't remove all locks held by %s\",\n"
+ " \t\t\thost->h_name);\n"
+ "@@ -334,3 +390,16 @@ nlmsvc_invalidate_all(void)\n"
+ " \t\tnlm_release_host(host);\n"
+ " \t}\n"
+ " }\n"
+ "+\n"
+ "+EXPORT_SYMBOL(nlmsvc_fo_unlock);\n"
+ "+\n"
+ "+/*\n"
+ "+ * release locks associated with an export fsid upon failover\n"
+ "+ */\n"
+ "+int\n"
+ "+nlmsvc_fo_unlock(int *fsid)\n"
+ "+{\n"
+ "+\t/* drop the locks */\n"
+ "+\treturn (nlm_traverse_files(NULL, fsid, NLM_ACT_FO_UNLOCK)); \n"
+ "+}\n"
+ "+\n"
+ "--- linux-0/include/linux/lockd/bind.h\t2006-09-03 21:06:18.000000000 -0400\n"
+ "+++ linux-1/include/linux/lockd/bind.h\t2006-09-03 21:51:41.000000000 -0400\n"
+ "@@ -33,4 +33,9 @@ extern int\tnlmclnt_proc(struct inode *, \n"
+ " extern int\tlockd_up(void);\n"
+ " extern void\tlockd_down(void);\n"
+ " \n"
+ "+/*\n"
+ "+ * NLM failover\n"
+ "+ */\n"
+ "+extern int     nlmsvc_fo_unlock(int *fsid);\n"
+ "+\n"
+ " #endif /* LINUX_LOCKD_BIND_H */\n"
+ "--- linux-0/fs/nfsd/nfsctl.c\t2006-09-03 21:06:17.000000000 -0400\n"
+ "+++ linux-1/fs/nfsd/nfsctl.c\t2006-09-03 21:51:40.000000000 -0400\n"
+ "@@ -33,6 +33,10 @@\n"
+ " #include <linux/nfsd/syscall.h>\n"
+ " #include <linux/nfsd/interface.h>\n"
+ " \n"
+ "+/* nlm failover */\n"
+ "+#include <linux/in.h>\n"
+ "+#include <linux/lockd/bind.h>\n"
+ "+\n"
+ " #include <asm/uaccess.h>\n"
+ " \n"
+ " unsigned int nfsd_versbits = ~0;\n"
+ "@@ -51,6 +55,7 @@ enum {\n"
+ " \tNFSD_Getfs,\n"
+ " \tNFSD_List,\n"
+ " \tNFSD_Fh,\n"
+ "+\tNFSD_NlmUnlock,\n"
+ " \tNFSD_Threads,\n"
+ " \tNFSD_Versions,\n"
+ " \t/*\n"
+ "@@ -81,6 +86,14 @@ static ssize_t write_leasetime(struct fi\n"
+ " static ssize_t write_recoverydir(struct file *file, char *buf, size_t size);\n"
+ " #endif\n"
+ " \n"
+ "+/*\n"
+ "+ * NLM lock failover\n"
+ "+ */\n"
+ "+\n"
+ "+#define NFSDDBG_FACILITY\tNFSDDBG_CLUSTER\n"
+ "+\n"
+ "+static ssize_t write_fo_unlock(struct file *file, char *buf, size_t size);\n"
+ "+\n"
+ " static ssize_t (*write_op[])(struct file *, char *, size_t) = {\n"
+ " \t[NFSD_Svc] = write_svc,\n"
+ " \t[NFSD_Add] = write_add,\n"
+ "@@ -90,6 +103,7 @@ static ssize_t (*write_op[])(struct file\n"
+ " \t[NFSD_Getfd] = write_getfd,\n"
+ " \t[NFSD_Getfs] = write_getfs,\n"
+ " \t[NFSD_Fh] = write_filehandle,\n"
+ "+\t[NFSD_NlmUnlock] = write_fo_unlock,\n"
+ " \t[NFSD_Threads] = write_threads,\n"
+ " \t[NFSD_Versions] = write_versions,\n"
+ " #ifdef CONFIG_NFSD_V4\n"
+ "@@ -334,6 +348,33 @@ static ssize_t write_filehandle(struct f\n"
+ " \treturn mesg - buf;\t\n"
+ " }\n"
+ " \n"
+ "+static ssize_t write_fo_unlock(struct file *file, char *buf, size_t size)\n"
+ "+{\n"
+ "+\tchar *mesg = buf;\n"
+ "+\tint fsid, rc;\n"
+ "+\n"
+ "+\tif (size <= 0) return -EINVAL;\n"
+ "+\n"
+ "+\t/* convert string into a valid fsid */\n"
+ "+\trc = get_int(&mesg, &fsid);\n"
+ "+\tif (rc) {\n"
+ "+\t\tdprintk(\"nfsd: write_fo_unlock invalid fsid(%s)\\n\", buf);\n"
+ "+\t\treturn rc;\n"
+ "+\t}\n"
+ "+\n"
+ "+\t/* call nlm to release the locks - fsid is passed by reference \n"
+ "+\t * to allow other routine uses NULL pointer. */\n"
+ "+\trc = nlmsvc_fo_unlock(&fsid);\n"
+ "+\tif (rc) {\n"
+ "+\t\tdprintk(\"nfsd: nlmsvc_fo_unlock return rc=%d\\n\", rc);\n"
+ "+\t\treturn rc;\n"
+ "+\t}\n"
+ "+\n"
+ "+\t/* done */\n"
+ "+\tsprintf(buf, \"nlm_fo fsid=%d released locks\\n\", fsid);\n"
+ "+\treturn strlen(buf);\n"
+ "+}\n"
+ "+\n"
+ " extern int nfsd_nrthreads(void);\n"
+ " \n"
+ " static ssize_t write_threads(struct file *file, char *buf, size_t size)\n"
+ "@@ -482,6 +523,7 @@ static int nfsd_fill_super(struct super_\n"
+ " \t\t[NFSD_Getfs] = {\".getfs\", &transaction_ops, S_IWUSR|S_IRUSR},\n"
+ " \t\t[NFSD_List] = {\"exports\", &exports_operations, S_IRUGO},\n"
+ " \t\t[NFSD_Fh] = {\"filehandle\", &transaction_ops, S_IWUSR|S_IRUSR},\n"
+ "+\t\t[NFSD_NlmUnlock] = {\"nlm_unlock\", &transaction_ops, S_IWUSR|S_IRUSR},\n"
+ " \t\t[NFSD_Threads] = {\"threads\", &transaction_ops, S_IWUSR|S_IRUSR},\n"
+ " \t\t[NFSD_Versions] = {\"versions\", &transaction_ops, S_IWUSR|S_IRUSR},\n"
+ " #ifdef CONFIG_NFSD_V4\n"
+ "--- linux-0/include/linux/nfsd/debug.h\t2006-09-03 21:06:18.000000000 -0400\n"
+ "+++ linux-1/include/linux/nfsd/debug.h\t2006-09-03 21:51:41.000000000 -0400\n"
+ "@@ -32,6 +32,7 @@\n"
+ " #define NFSDDBG_REPCACHE\t0x0080\n"
+ " #define NFSDDBG_XDR\t\t0x0100\n"
+ " #define NFSDDBG_LOCKD\t\t0x0200\n"
+ "+#define NFSDDBG_CLUSTER \t0x0400\n"
+ " #define NFSDDBG_ALL\t\t0x7FFF\n"
+ " #define NFSDDBG_NOCHANGE\t0xFFFF"
+ "\01:3\0"
+ "b\0"
+ "-------------------------------------------------------------------------\n"
+ "Using Tomcat but need to do more? Need to support web services, security?\n"
+ "Get stuff done quickly with pre-integrated technology to make your job easier\n"
+ "Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo\n"
+ http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
+ "\01:4\0"
+ "b\0"
+ "_______________________________________________\n"
+ "NFS maillist  -  NFS@lists.sourceforge.net\n"
+ https://lists.sourceforge.net/lists/listinfo/nfs
 
-d48816a3057ea1371aab26bfccdc9aa23f47f7e348487628e17ed56ff14a79c0
+b83e1303a69d50f69e379e2c4930fdc8d872705f9db336b5b6a3eae0889c4387

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.