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

diff --git a/a/1.txt b/N1/1.txt
index aeab833..7aa473f 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -7,11 +7,3 @@ root-shell> echo 10.1.1.64 > /proc/fs/nfsd/resume_ip
 Only support IPV4 address for this patch submission.
 
 -- Wendy
-
--------------- next part --------------
-A non-text attachment was scrubbed...
-Name: resume_001.patch
-Type: text/x-patch
-Size: 4357 bytes
-Desc: not available
-URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20080125/9266b25f/attachment.bin>
diff --git a/N1/2.hdr b/N1/2.hdr
new file mode 100644
index 0000000..0a975b6
--- /dev/null
+++ b/N1/2.hdr
@@ -0,0 +1,5 @@
+Content-Type: text/x-patch;
+ name="resume_001.patch"
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline;
+ filename="resume_001.patch"
diff --git a/N1/2.txt b/N1/2.txt
new file mode 100644
index 0000000..f08d09e
--- /dev/null
+++ b/N1/2.txt
@@ -0,0 +1,135 @@
+Add a new nfsd procfs file "resume_ip" to enable per-ip base lockd grace 
+period:
+
+Example Usage:
+root-shell> echo 10.1.1.64 > /proc/fs/nfsd/resume_ip
+
+Only support IPV4 address for this patch submission.
+
+Signed-off-by: S. Wendy Cheng <wcheng@redhat.com>
+Signed-off-by: Lon Hohberger  <lhh@redhat.com>
+
+ fs/lockd/svcsubs.c          |    9 +++++++++
+ fs/nfsd/nfsctl.c            |   43 ++++++++++++++++++++++++++++++++++++++-----
+ include/linux/lockd/lockd.h |    1 +
+ 3 files changed, 48 insertions(+), 5 deletions(-)
+
+--- linux-1/fs/nfsd/nfsctl.c	2008-01-22 10:36:24.000000000 -0500
++++ linux-2/fs/nfsd/nfsctl.c	2008-01-24 17:03:12.000000000 -0500
+@@ -56,6 +56,7 @@ enum {
+ 	NFSD_Fh,
+ 	NFSD_FO_UnlockIP,
+ 	NFSD_FO_UnlockFS,
++	NFSD_FO_ResumeIP,
+ 	NFSD_Threads,
+ 	NFSD_Pool_Threads,
+ 	NFSD_Versions,
+@@ -94,6 +95,7 @@ static ssize_t write_recoverydir(struct 
+ 
+ static ssize_t failover_unlock_ip(struct file *file, char *buf, size_t size);
+ static ssize_t failover_unlock_fs(struct file *file, char *buf, size_t size);
++static ssize_t failover_resume_ip(struct file *file, char *buf, size_t size);
+ 
+ static ssize_t (*write_op[])(struct file *, char *, size_t) = {
+ 	[NFSD_Svc] = write_svc,
+@@ -106,6 +108,7 @@ static ssize_t (*write_op[])(struct file
+ 	[NFSD_Fh] = write_filehandle,
+ 	[NFSD_FO_UnlockIP] = failover_unlock_ip,
+ 	[NFSD_FO_UnlockFS] = failover_unlock_fs,
++	[NFSD_FO_ResumeIP] = failover_resume_ip,
+ 	[NFSD_Threads] = write_threads,
+ 	[NFSD_Pool_Threads] = write_pool_threads,
+ 	[NFSD_Versions] = write_versions,
+@@ -297,11 +300,13 @@ static ssize_t write_getfd(struct file *
+ 	return err;
+ }
+ 
+-static ssize_t failover_unlock_ip(struct file *file, char *buf, size_t size)
++static int failover_parse_ip(struct file *file,
++			     char *buf,
++			     size_t size,
++			     __be32 *server_ip)
+ {
+-	__be32 server_ip;
+ 	char *fo_path, c;
+-	int b1, b2, b3, b4;
++	int b1, b2, b3, b4, len;
+ 
+ 	/* sanity check */
+ 	if (size == 0)
+@@ -315,13 +320,39 @@ static ssize_t failover_unlock_ip(struct
+ 		return -EINVAL;
+ 
+ 	/* get ipv4 address */
+-	if (sscanf(fo_path, "%u.%u.%u.%u%c", &b1, &b2, &b3, &b4, &c) != 4)
++	len = sscanf(fo_path, "%u.%u.%u.%u%c", &b1, &b2, &b3, &b4, &c);
++	if (len != 4)
+ 		return -EINVAL;
+-	server_ip = htonl((((((b1<<8)|b2)<<8)|b3)<<8)|b4);
++
++	*server_ip = htonl((((((b1<<8)|b2)<<8)|b3)<<8)|b4);
++
++	return len;
++}
++
++static ssize_t failover_unlock_ip(struct file *file, char *buf, size_t size)
++{
++	__be32 server_ip;
++	int rc;
++
++	rc = failover_parse_ip(file, buf, size, &server_ip);
++	if (rc < 0)
++		return rc;
+ 
+ 	return nlmsvc_failover_ip(server_ip);
+ }
+ 
++static ssize_t failover_resume_ip(struct file *file, char *buf, size_t size)
++{
++	__be32 server_ip;
++	int len;
++
++	len = failover_parse_ip(file, buf, size, &server_ip);
++	if (len < 0)
++		return len;
++
++	return nlmsvc_failover_setgrace(&server_ip, len);
++}
++
+ static ssize_t failover_unlock_fs(struct file *file, char *buf, size_t size)
+ {
+ 	struct nameidata nd;
+@@ -711,6 +742,8 @@ static int nfsd_fill_super(struct super_
+ 					&transaction_ops, S_IWUSR|S_IRUSR},
+ 		[NFSD_FO_UnlockFS] = {"unlock_filesystem",
+ 					&transaction_ops, S_IWUSR|S_IRUSR},
++		[NFSD_FO_ResumeIP] = {"resume_ip",
++					&transaction_ops, S_IWUSR|S_IRUSR},
+ 		[NFSD_Fh] = {"filehandle", &transaction_ops, S_IWUSR|S_IRUSR},
+ 		[NFSD_Threads] = {"threads", &transaction_ops, S_IWUSR|S_IRUSR},
+ 		[NFSD_Pool_Threads] = {"pool_threads", &transaction_ops, S_IWUSR|S_IRUSR},
+--- linux-1/fs/lockd/svcsubs.c	2008-01-22 10:36:24.000000000 -0500
++++ linux-2/fs/lockd/svcsubs.c	2008-01-22 11:45:44.000000000 -0500
+@@ -422,3 +422,12 @@ nlmsvc_failover_ip(__be32 server_addr)
+ 			nlmsvc_failover_file_ok_ip);
+ }
+ EXPORT_SYMBOL_GPL(nlmsvc_failover_ip);
++
++int
++nlmsvc_failover_setgrace(void *server_ip, int ip_size)
++{
++	/* implemented by resume_002.patch */
++	return ENOSYS;
++}
++EXPORT_SYMBOL_GPL(nlmsvc_failover_setgrace);
++
+--- linux-1/include/linux/lockd/lockd.h	2008-01-22 10:36:24.000000000 -0500
++++ linux-2/include/linux/lockd/lockd.h	2008-01-22 11:45:44.000000000 -0500
+@@ -220,6 +220,7 @@ void		  nlmsvc_invalidate_all(void);
+  */
+ int           nlmsvc_failover_path(struct nameidata *nd);
+ int           nlmsvc_failover_ip(__be32 server_addr);
++int           nlmsvc_failover_setgrace(void *server_ip, int ip_size);
+ 
+ static __inline__ struct inode *
+ nlmsvc_file_inode(struct nlm_file *file)
diff --git a/a/content_digest b/N1/content_digest
index 26dff2d..e2f0d76 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,8 +1,9 @@
  "From\0Wendy Cheng <wcheng@redhat.com>\0"
- "Subject\0[Cluster-devel] [PATCH 1/3] NLM add resume procfs file\0"
+ "Subject\0[PATCH 1/3] NLM add resume procfs file\0"
  "Date\0Fri, 25 Jan 2008 00:15:05 -0500\0"
- "To\0cluster-devel.redhat.com\0"
- "\00:1\0"
+ "To\0NFS list <linux-nfs@vger.kernel.org>"
+ " cluster-devel@redhat.com\0"
+ "\01:1\0"
  "b\0"
  "Add a new nfsd procfs file \"resume_ip\" to enable per-ip base lockd grace \n"
  "period:\n"
@@ -12,14 +13,144 @@
  "\n"
  "Only support IPV4 address for this patch submission.\n"
  "\n"
- "-- Wendy\n"
+ -- Wendy
+ "\01:2\0"
+ "fn\0resume_001.patch\0"
+ "b\0"
+ "Add a new nfsd procfs file \"resume_ip\" to enable per-ip base lockd grace \n"
+ "period:\n"
+ "\n"
+ "Example Usage:\n"
+ "root-shell> echo 10.1.1.64 > /proc/fs/nfsd/resume_ip\n"
+ "\n"
+ "Only support IPV4 address for this patch submission.\n"
+ "\n"
+ "Signed-off-by: S. Wendy Cheng <wcheng@redhat.com>\n"
+ "Signed-off-by: Lon Hohberger  <lhh@redhat.com>\n"
+ "\n"
+ " fs/lockd/svcsubs.c          |    9 +++++++++\n"
+ " fs/nfsd/nfsctl.c            |   43 ++++++++++++++++++++++++++++++++++++++-----\n"
+ " include/linux/lockd/lockd.h |    1 +\n"
+ " 3 files changed, 48 insertions(+), 5 deletions(-)\n"
  "\n"
- "-------------- next part --------------\n"
- "A non-text attachment was scrubbed...\n"
- "Name: resume_001.patch\n"
- "Type: text/x-patch\n"
- "Size: 4357 bytes\n"
- "Desc: not available\n"
- URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20080125/9266b25f/attachment.bin>
+ "--- linux-1/fs/nfsd/nfsctl.c\t2008-01-22 10:36:24.000000000 -0500\n"
+ "+++ linux-2/fs/nfsd/nfsctl.c\t2008-01-24 17:03:12.000000000 -0500\n"
+ "@@ -56,6 +56,7 @@ enum {\n"
+ " \tNFSD_Fh,\n"
+ " \tNFSD_FO_UnlockIP,\n"
+ " \tNFSD_FO_UnlockFS,\n"
+ "+\tNFSD_FO_ResumeIP,\n"
+ " \tNFSD_Threads,\n"
+ " \tNFSD_Pool_Threads,\n"
+ " \tNFSD_Versions,\n"
+ "@@ -94,6 +95,7 @@ static ssize_t write_recoverydir(struct \n"
+ " \n"
+ " static ssize_t failover_unlock_ip(struct file *file, char *buf, size_t size);\n"
+ " static ssize_t failover_unlock_fs(struct file *file, char *buf, size_t size);\n"
+ "+static ssize_t failover_resume_ip(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"
+ "@@ -106,6 +108,7 @@ static ssize_t (*write_op[])(struct file\n"
+ " \t[NFSD_Fh] = write_filehandle,\n"
+ " \t[NFSD_FO_UnlockIP] = failover_unlock_ip,\n"
+ " \t[NFSD_FO_UnlockFS] = failover_unlock_fs,\n"
+ "+\t[NFSD_FO_ResumeIP] = failover_resume_ip,\n"
+ " \t[NFSD_Threads] = write_threads,\n"
+ " \t[NFSD_Pool_Threads] = write_pool_threads,\n"
+ " \t[NFSD_Versions] = write_versions,\n"
+ "@@ -297,11 +300,13 @@ static ssize_t write_getfd(struct file *\n"
+ " \treturn err;\n"
+ " }\n"
+ " \n"
+ "-static ssize_t failover_unlock_ip(struct file *file, char *buf, size_t size)\n"
+ "+static int failover_parse_ip(struct file *file,\n"
+ "+\t\t\t     char *buf,\n"
+ "+\t\t\t     size_t size,\n"
+ "+\t\t\t     __be32 *server_ip)\n"
+ " {\n"
+ "-\t__be32 server_ip;\n"
+ " \tchar *fo_path, c;\n"
+ "-\tint b1, b2, b3, b4;\n"
+ "+\tint b1, b2, b3, b4, len;\n"
+ " \n"
+ " \t/* sanity check */\n"
+ " \tif (size == 0)\n"
+ "@@ -315,13 +320,39 @@ static ssize_t failover_unlock_ip(struct\n"
+ " \t\treturn -EINVAL;\n"
+ " \n"
+ " \t/* get ipv4 address */\n"
+ "-\tif (sscanf(fo_path, \"%u.%u.%u.%u%c\", &b1, &b2, &b3, &b4, &c) != 4)\n"
+ "+\tlen = sscanf(fo_path, \"%u.%u.%u.%u%c\", &b1, &b2, &b3, &b4, &c);\n"
+ "+\tif (len != 4)\n"
+ " \t\treturn -EINVAL;\n"
+ "-\tserver_ip = htonl((((((b1<<8)|b2)<<8)|b3)<<8)|b4);\n"
+ "+\n"
+ "+\t*server_ip = htonl((((((b1<<8)|b2)<<8)|b3)<<8)|b4);\n"
+ "+\n"
+ "+\treturn len;\n"
+ "+}\n"
+ "+\n"
+ "+static ssize_t failover_unlock_ip(struct file *file, char *buf, size_t size)\n"
+ "+{\n"
+ "+\t__be32 server_ip;\n"
+ "+\tint rc;\n"
+ "+\n"
+ "+\trc = failover_parse_ip(file, buf, size, &server_ip);\n"
+ "+\tif (rc < 0)\n"
+ "+\t\treturn rc;\n"
+ " \n"
+ " \treturn nlmsvc_failover_ip(server_ip);\n"
+ " }\n"
+ " \n"
+ "+static ssize_t failover_resume_ip(struct file *file, char *buf, size_t size)\n"
+ "+{\n"
+ "+\t__be32 server_ip;\n"
+ "+\tint len;\n"
+ "+\n"
+ "+\tlen = failover_parse_ip(file, buf, size, &server_ip);\n"
+ "+\tif (len < 0)\n"
+ "+\t\treturn len;\n"
+ "+\n"
+ "+\treturn nlmsvc_failover_setgrace(&server_ip, len);\n"
+ "+}\n"
+ "+\n"
+ " static ssize_t failover_unlock_fs(struct file *file, char *buf, size_t size)\n"
+ " {\n"
+ " \tstruct nameidata nd;\n"
+ "@@ -711,6 +742,8 @@ static int nfsd_fill_super(struct super_\n"
+ " \t\t\t\t\t&transaction_ops, S_IWUSR|S_IRUSR},\n"
+ " \t\t[NFSD_FO_UnlockFS] = {\"unlock_filesystem\",\n"
+ " \t\t\t\t\t&transaction_ops, S_IWUSR|S_IRUSR},\n"
+ "+\t\t[NFSD_FO_ResumeIP] = {\"resume_ip\",\n"
+ "+\t\t\t\t\t&transaction_ops, S_IWUSR|S_IRUSR},\n"
+ " \t\t[NFSD_Fh] = {\"filehandle\", &transaction_ops, S_IWUSR|S_IRUSR},\n"
+ " \t\t[NFSD_Threads] = {\"threads\", &transaction_ops, S_IWUSR|S_IRUSR},\n"
+ " \t\t[NFSD_Pool_Threads] = {\"pool_threads\", &transaction_ops, S_IWUSR|S_IRUSR},\n"
+ "--- linux-1/fs/lockd/svcsubs.c\t2008-01-22 10:36:24.000000000 -0500\n"
+ "+++ linux-2/fs/lockd/svcsubs.c\t2008-01-22 11:45:44.000000000 -0500\n"
+ "@@ -422,3 +422,12 @@ nlmsvc_failover_ip(__be32 server_addr)\n"
+ " \t\t\tnlmsvc_failover_file_ok_ip);\n"
+ " }\n"
+ " EXPORT_SYMBOL_GPL(nlmsvc_failover_ip);\n"
+ "+\n"
+ "+int\n"
+ "+nlmsvc_failover_setgrace(void *server_ip, int ip_size)\n"
+ "+{\n"
+ "+\t/* implemented by resume_002.patch */\n"
+ "+\treturn ENOSYS;\n"
+ "+}\n"
+ "+EXPORT_SYMBOL_GPL(nlmsvc_failover_setgrace);\n"
+ "+\n"
+ "--- linux-1/include/linux/lockd/lockd.h\t2008-01-22 10:36:24.000000000 -0500\n"
+ "+++ linux-2/include/linux/lockd/lockd.h\t2008-01-22 11:45:44.000000000 -0500\n"
+ "@@ -220,6 +220,7 @@ void\t\t  nlmsvc_invalidate_all(void);\n"
+ "  */\n"
+ " int           nlmsvc_failover_path(struct nameidata *nd);\n"
+ " int           nlmsvc_failover_ip(__be32 server_addr);\n"
+ "+int           nlmsvc_failover_setgrace(void *server_ip, int ip_size);\n"
+ " \n"
+ " static __inline__ struct inode *\n"
+  nlmsvc_file_inode(struct nlm_file *file)
 
-208184634d1b821daadf87588141358fb47be9c25a5889761d622656d18569fd
+af3a064764d4ffa0b1b85fb36feeb8f6a0a662fb34edf0ac666be4c7655c42b9

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.