All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <44A417E7.5090500@redhat.com>

diff --git a/a/1.txt b/N1/1.txt
index 705d237..febece8 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -7,11 +7,3 @@ associated file if server ip address matches.
 Due to the size of rq_daddr (u32), we would not be able to support IPV6 
 for this round of changes. Another to-do item is to enable client:server 
 ip pairs to allow NFS V4 failover.
-
-
-
-
--------------- next part --------------
-An embedded and charset-unspecified text was scrubbed...
-Name: gfs_nlm_unlock.patch
-URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20060629/0e2f4e2b/attachment.ksh>
diff --git a/N1/2.hdr b/N1/2.hdr
new file mode 100644
index 0000000..9bc2c45
--- /dev/null
+++ b/N1/2.hdr
@@ -0,0 +1,5 @@
+Content-Type: text/plain;
+ 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..5b368fd
--- /dev/null
+++ b/N1/2.txt
@@ -0,0 +1,279 @@
+ fs/lockd/svcsubs.c          |   58 ++++++++++++++++++++++++++++++++++++++++----
+ fs/nfsd/nfsctl.c            |   54 ++++++++++++++++++++++++++++++++++++++++
+ include/linux/lockd/bind.h  |    5 +++
+ include/linux/lockd/lockd.h |    3 ++
+ net/sunrpc/svcsock.c        |    5 +++
+ 5 files changed, 120 insertions(+), 5 deletions(-)
+
+--- linux-2.6.17/include/linux/lockd/lockd.h	2006-06-17 21:49:35.000000000 -0400
++++ linux-2.6.17-1/include/linux/lockd/lockd.h	2006-06-27 10:58:47.000000000 -0400
+@@ -105,6 +105,7 @@ struct nlm_file {
+ 	unsigned int		f_count;	/* reference count */
+ 	struct semaphore	f_sema;		/* avoid concurrent access */
+ 	int		       	f_hash;		/* hash of f_handle */
++	__u32			f_iaddr;	/* server ip for failover */
+ };
+ 
+ /*
+@@ -133,6 +134,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
+@@ -196,6 +198,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(struct in_addr *);
+ 
+ static __inline__ struct inode *
+ nlmsvc_file_inode(struct nlm_file *file)
+--- linux-2.6.17/net/sunrpc/svcsock.c	2006-06-17 21:49:35.000000000 -0400
++++ linux-2.6.17-1/net/sunrpc/svcsock.c	2006-06-27 10:58:47.000000000 -0400
+@@ -454,6 +454,7 @@ svc_recvfrom(struct svc_rqst *rqstp, str
+ 	struct msghdr	msg;
+ 	struct socket	*sock;
+ 	int		len, alen;
++	struct sockaddr_in   daddr;
+ 
+ 	rqstp->rq_addrlen = sizeof(rqstp->rq_addr);
+ 	sock = rqstp->rq_sock->sk_sock;
+@@ -474,6 +475,10 @@ svc_recvfrom(struct svc_rqst *rqstp, str
+ 	alen = sizeof(rqstp->rq_addr);
+ 	sock->ops->getname(sock, (struct sockaddr *)&rqstp->rq_addr, &alen, 1);
+ 
++	/* add server ip for nlm lock failover */
++	sock->ops->getname(sock, (struct sockaddr *)&daddr, &alen, 0);
++	rqstp->rq_daddr = daddr.sin_addr.s_addr;
++
+ 	dprintk("svc: socket %p recvfrom(%p, %Zu) = %d\n",
+ 		rqstp->rq_sock, iov[0].iov_base, iov[0].iov_len, len);
+ 
+--- linux-2.6.17/fs/lockd/svcsubs.c	2006-06-17 21:49:35.000000000 -0400
++++ linux-2.6.17-1/fs/lockd/svcsubs.c	2006-06-28 14:55:33.000000000 -0400
+@@ -20,6 +20,8 @@
+ #include <linux/lockd/share.h>
+ #include <linux/lockd/sm_inter.h>
+ 
++#include <linux/module.h>
++
+ #define NLMDBG_FACILITY		NLMDBG_SVCSUBS
+ 
+ 
+@@ -124,6 +126,10 @@ nlm_lookup_file(struct svc_rqst *rqstp, 
+ 	file->f_next = nlm_files[hash];
+ 	nlm_files[hash] = file;
+ 
++	/* fill in f_iaddr for nlm lock failover */
++	file->f_iaddr = rqstp->rq_daddr;
++	dprintk("lockd: file->f_iaddr = %u.%u.%u.%u\n", NIPQUAD(file->f_iaddr));
++
+ found:
+ 	dprintk("lockd: found file %p (count %d)\n", file, file->f_count);
+ 	*result = file;
+@@ -235,18 +241,38 @@ 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, struct in_addr *serv, int action)
+ {
+ 	struct nlm_file	*file, **fp;
+-	int		i;
++	int		i, act=action;
+ 
+ 	mutex_lock(&nlm_file_mutex);
+ 	for (i = 0; i < FILE_NRHASH; i++) {
+ 		fp = nlm_files + i;
+ 		while ((file = *fp) != NULL) {
++
++			/*
++		 	 * NLM lock failover:
++		 	 *      Upon NLM_ACT_FO_UNLOCK, compare the
++		 	 *      server in_addr (f_iaddr) with requested
++		 	 *      serv. If match is found, the lock will 
++			 *	be released via NLM_ACT_UNLOCK.
++		 	 */
++			if (unlikely(action == NLM_ACT_FO_UNLOCK)) {
++				dprintk("lockd: fo file check %u.%u.%u.%u\n",
++					NIPQUAD(serv->s_addr));
++				if (serv->s_addr != file->f_iaddr) {
++					fp = &file->f_next;
++					continue;
++				}
++				dprintk("lockd: fo found match file 0x%x\n",
++					(int) file);
++				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)) {
+ 				mutex_unlock(&nlm_file_mutex);
+ 				return 1;
+ 			}
+@@ -254,6 +280,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=0x%x\n", 
++					(int) file);
+ 				*fp = file->f_next;
+ 				nlmsvc_ops->fclose(file->f_file);
+ 				kfree(file);
+@@ -301,7 +329,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);
+ }
+ 
+ /*
+@@ -312,7 +340,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);
+@@ -332,3 +360,23 @@ nlmsvc_invalidate_all(void)
+ 		nlm_release_host(host);
+ 	}
+ }
++
++EXPORT_SYMBOL(nlmsvc_fo_unlock);
++
++/*
++ * release locks associated with an IP upon failover
++ */
++int
++nlmsvc_fo_unlock(struct in_addr *serv_ip)
++{
++	struct nlm_host clnt;
++
++	/* To do:
++	 * prepare nlm_host for nfs V4 client 
++	 */
++	memset(&clnt, 0, sizeof(struct nlm_host));
++
++	/* drop the locks */
++	return (nlm_traverse_files(NULL, serv_ip, NLM_ACT_FO_UNLOCK)); 
++}
++
+--- linux-2.6.17/include/linux/lockd/bind.h	2006-06-17 21:49:35.000000000 -0400
++++ linux-2.6.17-1/include/linux/lockd/bind.h	2006-06-27 10:58:51.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(struct in_addr *);
++
+ #endif /* LINUX_LOCKD_BIND_H */
+--- linux-2.6.17/fs/nfsd/nfsctl.c	2006-06-17 21:49:35.000000000 -0400
++++ linux-2.6.17-1/fs/nfsd/nfsctl.c	2006-06-27 23:37:05.000000000 -0400
+@@ -34,6 +34,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;
+@@ -52,6 +56,7 @@ enum {
+ 	NFSD_Getfs,
+ 	NFSD_List,
+ 	NFSD_Fh,
++	NFSD_Nlm_unlock,
+ 	NFSD_Threads,
+ 	NFSD_Versions,
+ 	/*
+@@ -82,6 +87,11 @@ static ssize_t write_leasetime(struct fi
+ static ssize_t write_recoverydir(struct file *file, char *buf, size_t size);
+ #endif
+ 
++/*
++ * NLM lock failover
++ */
++static ssize_t do_nlm_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,
+@@ -91,6 +101,7 @@ static ssize_t (*write_op[])(struct file
+ 	[NFSD_Getfd] = write_getfd,
+ 	[NFSD_Getfs] = write_getfs,
+ 	[NFSD_Fh] = write_filehandle,
++	[NFSD_Nlm_unlock] = do_nlm_fo_unlock,
+ 	[NFSD_Threads] = write_threads,
+ 	[NFSD_Versions] = write_versions,
+ #ifdef CONFIG_NFSD_V4
+@@ -335,6 +346,48 @@ static ssize_t write_filehandle(struct f
+ 	return mesg - buf;	
+ }
+ 
++extern __u32 in_aton(const char *str);
++
++int __get_nlm_host(char *buf, size_t size, struct in_addr *host_addr)
++{
++	/* sanity check */
++	if (size <= 0) return -EINVAL;
++
++	/* The ip is passed from nfsctl_transaction_write() 
++	 * where simple_transaction_get() "copy_from_user()"
++	 * into buf. Convert the string into a valid ip addr.
++	 */
++	host_addr->s_addr = in_aton(buf);
++	printk("nfsd: __get_nlm_host (%u.%u.%u.%u)\n",
++		NIPQUAD(host_addr->s_addr));
++	return 0;
++}
++
++static ssize_t do_nlm_fo_unlock(struct file *file, char *buf, size_t size)
++{
++	struct in_addr serv_addr;
++	int rc;
++
++	/* convert string into a valid ip */
++	rc = __get_nlm_host(buf, size, &serv_addr);
++	if (rc) {
++		printk("nfsd: do_nlm_ip_unlock invalid ip(%s)\n", buf);
++		return rc;
++	}
++
++	/* call nlm to release the locks */
++	rc = nlmsvc_fo_unlock(&serv_addr);
++	if (rc) {
++		printk("nfsd: nlmsvc_fo_unlock return rc=%d\n", rc);
++		return rc;
++	}
++
++	/* done */
++	sprintf(buf, "nlm ip unlock released for %u.%u.%u.%u\n",
++		NIPQUAD(serv_addr.s_addr));
++	return strlen(buf);
++}
++
+ extern int nfsd_nrthreads(void);
+ 
+ static ssize_t write_threads(struct file *file, char *buf, size_t size)
+@@ -483,6 +536,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_Nlm_unlock] = {"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
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..2784664
--- /dev/null
+++ b/N1/3.txt
@@ -0,0 +1,4 @@
+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 1741ce2..318c10f 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,8 +1,10 @@
  "From\0Wendy Cheng <wcheng@redhat.com>\0"
- "Subject\0[Cluster-devel] [RFC PATCH 1/3] NLM lock failover - lock release\0"
+ "Subject\0[RFC PATCH 1/3] NLM lock failover - lock release\0"
  "Date\0Thu, 29 Jun 2006 14:11:51 -0400\0"
- "To\0cluster-devel.redhat.com\0"
- "\00:1\0"
+ "To\0nfs@lists.sourceforge.net"
+ " cluster-devel@redhat.com\0"
+ "Cc\0Lon Hohberger <lhh@redhat.com>\0"
+ "\01:1\0"
  "b\0"
  "The patch piggy-backs the logic into \"rq_daddr\" field of struct svc_rqst \n"
  "where NFS server ip address is stored. Upon writing IPv4 address in \n"
@@ -12,14 +14,299 @@
  "\n"
  "Due to the size of rq_daddr (u32), we would not be able to support IPV6 \n"
  "for this round of changes. Another to-do item is to enable client:server \n"
- "ip pairs to allow NFS V4 failover.\n"
- "\n"
- "\n"
- "\n"
+ ip pairs to allow NFS V4 failover.
+ "\01:2\0"
+ "fn\0gfs_nlm_unlock.patch\0"
+ "b\0"
+ " fs/lockd/svcsubs.c          |   58 ++++++++++++++++++++++++++++++++++++++++----\n"
+ " fs/nfsd/nfsctl.c            |   54 ++++++++++++++++++++++++++++++++++++++++\n"
+ " include/linux/lockd/bind.h  |    5 +++\n"
+ " include/linux/lockd/lockd.h |    3 ++\n"
+ " net/sunrpc/svcsock.c        |    5 +++\n"
+ " 5 files changed, 120 insertions(+), 5 deletions(-)\n"
  "\n"
- "-------------- next part --------------\n"
- "An embedded and charset-unspecified text was scrubbed...\n"
- "Name: gfs_nlm_unlock.patch\n"
- URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20060629/0e2f4e2b/attachment.ksh>
+ "--- linux-2.6.17/include/linux/lockd/lockd.h\t2006-06-17 21:49:35.000000000 -0400\n"
+ "+++ linux-2.6.17-1/include/linux/lockd/lockd.h\t2006-06-27 10:58:47.000000000 -0400\n"
+ "@@ -105,6 +105,7 @@ struct nlm_file {\n"
+ " \tunsigned int\t\tf_count;\t/* reference count */\n"
+ " \tstruct semaphore\tf_sema;\t\t/* avoid concurrent access */\n"
+ " \tint\t\t       \tf_hash;\t\t/* hash of f_handle */\n"
+ "+\t__u32\t\t\tf_iaddr;\t/* server ip for failover */\n"
+ " };\n"
+ " \n"
+ " /*\n"
+ "@@ -133,6 +134,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"
+ "@@ -196,6 +198,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(struct in_addr *);\n"
+ " \n"
+ " static __inline__ struct inode *\n"
+ " nlmsvc_file_inode(struct nlm_file *file)\n"
+ "--- linux-2.6.17/net/sunrpc/svcsock.c\t2006-06-17 21:49:35.000000000 -0400\n"
+ "+++ linux-2.6.17-1/net/sunrpc/svcsock.c\t2006-06-27 10:58:47.000000000 -0400\n"
+ "@@ -454,6 +454,7 @@ svc_recvfrom(struct svc_rqst *rqstp, str\n"
+ " \tstruct msghdr\tmsg;\n"
+ " \tstruct socket\t*sock;\n"
+ " \tint\t\tlen, alen;\n"
+ "+\tstruct sockaddr_in   daddr;\n"
+ " \n"
+ " \trqstp->rq_addrlen = sizeof(rqstp->rq_addr);\n"
+ " \tsock = rqstp->rq_sock->sk_sock;\n"
+ "@@ -474,6 +475,10 @@ svc_recvfrom(struct svc_rqst *rqstp, str\n"
+ " \talen = sizeof(rqstp->rq_addr);\n"
+ " \tsock->ops->getname(sock, (struct sockaddr *)&rqstp->rq_addr, &alen, 1);\n"
+ " \n"
+ "+\t/* add server ip for nlm lock failover */\n"
+ "+\tsock->ops->getname(sock, (struct sockaddr *)&daddr, &alen, 0);\n"
+ "+\trqstp->rq_daddr = daddr.sin_addr.s_addr;\n"
+ "+\n"
+ " \tdprintk(\"svc: socket %p recvfrom(%p, %Zu) = %d\\n\",\n"
+ " \t\trqstp->rq_sock, iov[0].iov_base, iov[0].iov_len, len);\n"
+ " \n"
+ "--- linux-2.6.17/fs/lockd/svcsubs.c\t2006-06-17 21:49:35.000000000 -0400\n"
+ "+++ linux-2.6.17-1/fs/lockd/svcsubs.c\t2006-06-28 14:55:33.000000000 -0400\n"
+ "@@ -20,6 +20,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"
+ "@@ -124,6 +126,10 @@ nlm_lookup_file(struct svc_rqst *rqstp, \n"
+ " \tfile->f_next = nlm_files[hash];\n"
+ " \tnlm_files[hash] = file;\n"
+ " \n"
+ "+\t/* fill in f_iaddr for nlm lock failover */\n"
+ "+\tfile->f_iaddr = rqstp->rq_daddr;\n"
+ "+\tdprintk(\"lockd: file->f_iaddr = %u.%u.%u.%u\\n\", NIPQUAD(file->f_iaddr));\n"
+ "+\n"
+ " found:\n"
+ " \tdprintk(\"lockd: found file %p (count %d)\\n\", file, file->f_count);\n"
+ " \t*result = file;\n"
+ "@@ -235,18 +241,38 @@ 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, struct in_addr *serv, int action)\n"
+ " {\n"
+ " \tstruct nlm_file\t*file, **fp;\n"
+ "-\tint\t\ti;\n"
+ "+\tint\t\ti, act=action;\n"
+ " \n"
+ " \tmutex_lock(&nlm_file_mutex);\n"
+ " \tfor (i = 0; i < FILE_NRHASH; i++) {\n"
+ " \t\tfp = nlm_files + i;\n"
+ " \t\twhile ((file = *fp) != NULL) {\n"
+ "+\n"
+ "+\t\t\t/*\n"
+ "+\t\t \t * NLM lock failover:\n"
+ "+\t\t \t *      Upon NLM_ACT_FO_UNLOCK, compare the\n"
+ "+\t\t \t *      server in_addr (f_iaddr) with requested\n"
+ "+\t\t \t *      serv. 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\tdprintk(\"lockd: fo file check %u.%u.%u.%u\\n\",\n"
+ "+\t\t\t\t\tNIPQUAD(serv->s_addr));\n"
+ "+\t\t\t\tif (serv->s_addr != file->f_iaddr) {\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: fo found match file 0x%x\\n\",\n"
+ "+\t\t\t\t\t(int) file);\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\tmutex_unlock(&nlm_file_mutex);\n"
+ " \t\t\t\treturn 1;\n"
+ " \t\t\t}\n"
+ "@@ -254,6 +280,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=0x%x\\n\", \n"
+ "+\t\t\t\t\t(int) 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"
+ "@@ -301,7 +329,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"
+ "@@ -312,7 +340,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"
+ "@@ -332,3 +360,23 @@ 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 IP upon failover\n"
+ "+ */\n"
+ "+int\n"
+ "+nlmsvc_fo_unlock(struct in_addr *serv_ip)\n"
+ "+{\n"
+ "+\tstruct nlm_host clnt;\n"
+ "+\n"
+ "+\t/* To do:\n"
+ "+\t * prepare nlm_host for nfs V4 client \n"
+ "+\t */\n"
+ "+\tmemset(&clnt, 0, sizeof(struct nlm_host));\n"
+ "+\n"
+ "+\t/* drop the locks */\n"
+ "+\treturn (nlm_traverse_files(NULL, serv_ip, NLM_ACT_FO_UNLOCK)); \n"
+ "+}\n"
+ "+\n"
+ "--- linux-2.6.17/include/linux/lockd/bind.h\t2006-06-17 21:49:35.000000000 -0400\n"
+ "+++ linux-2.6.17-1/include/linux/lockd/bind.h\t2006-06-27 10:58:51.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(struct in_addr *);\n"
+ "+\n"
+ " #endif /* LINUX_LOCKD_BIND_H */\n"
+ "--- linux-2.6.17/fs/nfsd/nfsctl.c\t2006-06-17 21:49:35.000000000 -0400\n"
+ "+++ linux-2.6.17-1/fs/nfsd/nfsctl.c\t2006-06-27 23:37:05.000000000 -0400\n"
+ "@@ -34,6 +34,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"
+ "@@ -52,6 +56,7 @@ enum {\n"
+ " \tNFSD_Getfs,\n"
+ " \tNFSD_List,\n"
+ " \tNFSD_Fh,\n"
+ "+\tNFSD_Nlm_unlock,\n"
+ " \tNFSD_Threads,\n"
+ " \tNFSD_Versions,\n"
+ " \t/*\n"
+ "@@ -82,6 +87,11 @@ 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"
+ "+static ssize_t do_nlm_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"
+ "@@ -91,6 +101,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_Nlm_unlock] = do_nlm_fo_unlock,\n"
+ " \t[NFSD_Threads] = write_threads,\n"
+ " \t[NFSD_Versions] = write_versions,\n"
+ " #ifdef CONFIG_NFSD_V4\n"
+ "@@ -335,6 +346,48 @@ static ssize_t write_filehandle(struct f\n"
+ " \treturn mesg - buf;\t\n"
+ " }\n"
+ " \n"
+ "+extern __u32 in_aton(const char *str);\n"
+ "+\n"
+ "+int __get_nlm_host(char *buf, size_t size, struct in_addr *host_addr)\n"
+ "+{\n"
+ "+\t/* sanity check */\n"
+ "+\tif (size <= 0) return -EINVAL;\n"
+ "+\n"
+ "+\t/* The ip is passed from nfsctl_transaction_write() \n"
+ "+\t * where simple_transaction_get() \"copy_from_user()\"\n"
+ "+\t * into buf. Convert the string into a valid ip addr.\n"
+ "+\t */\n"
+ "+\thost_addr->s_addr = in_aton(buf);\n"
+ "+\tprintk(\"nfsd: __get_nlm_host (%u.%u.%u.%u)\\n\",\n"
+ "+\t\tNIPQUAD(host_addr->s_addr));\n"
+ "+\treturn 0;\n"
+ "+}\n"
+ "+\n"
+ "+static ssize_t do_nlm_fo_unlock(struct file *file, char *buf, size_t size)\n"
+ "+{\n"
+ "+\tstruct in_addr serv_addr;\n"
+ "+\tint rc;\n"
+ "+\n"
+ "+\t/* convert string into a valid ip */\n"
+ "+\trc = __get_nlm_host(buf, size, &serv_addr);\n"
+ "+\tif (rc) {\n"
+ "+\t\tprintk(\"nfsd: do_nlm_ip_unlock invalid ip(%s)\\n\", buf);\n"
+ "+\t\treturn rc;\n"
+ "+\t}\n"
+ "+\n"
+ "+\t/* call nlm to release the locks */\n"
+ "+\trc = nlmsvc_fo_unlock(&serv_addr);\n"
+ "+\tif (rc) {\n"
+ "+\t\tprintk(\"nfsd: nlmsvc_fo_unlock return rc=%d\\n\", rc);\n"
+ "+\t\treturn rc;\n"
+ "+\t}\n"
+ "+\n"
+ "+\t/* done */\n"
+ "+\tsprintf(buf, \"nlm ip unlock released for %u.%u.%u.%u\\n\",\n"
+ "+\t\tNIPQUAD(serv_addr.s_addr));\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"
+ "@@ -483,6 +536,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_Nlm_unlock] = {\"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
+ "\01:3\0"
+ "b\0"
+ "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
 
-15374b709ecb7343035a075ecfca647dad7393fe1327883601f9f52348a18e31
+ba273f009d64d615ac3a96aa373c7fa815821732973e0f2c1c304b59aa62c272

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.