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

diff --git a/a/1.txt b/N1/1.txt
index 457b50f..65c1ac0 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -20,11 +20,3 @@ Signed-off-by: Lon Hohberger  <lhh@redhat.com>
  include/linux/lockd/bind.h  |    3
  include/linux/lockd/lockd.h |   14 +++
  7 files changed, 279 insertions(+), 15 deletions(-)
-
--------------- next part --------------
-A non-text attachment was scrubbed...
-Name: gfs_nlm_igrace.patch
-Type: text/x-patch
-Size: 15444 bytes
-Desc: not available
-URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20060914/3cf5f3ed/attachment.bin>
diff --git a/N1/2.hdr b/N1/2.hdr
new file mode 100644
index 0000000..f7a1ca1
--- /dev/null
+++ b/N1/2.hdr
@@ -0,0 +1,5 @@
+Content-Type: text/x-patch;
+ name="gfs_nlm_igrace.patch"
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline;
+ filename="gfs_nlm_igrace.patch"
diff --git a/N1/2.txt b/N1/2.txt
new file mode 100644
index 0000000..f5bef69
--- /dev/null
+++ b/N1/2.txt
@@ -0,0 +1,516 @@
+--- linux-1/include/linux/lockd/lockd.h	2006-09-03 21:51:41.000000000 -0400
++++ linux-2/include/linux/lockd/lockd.h	2006-09-13 22:48:00.000000000 -0400
+@@ -107,6 +107,17 @@ struct nlm_file {
+ 	int		       	f_hash;		/* hash of f_handle */
+ };
+ 
++#define NLM_FO_MAX_FSID_GP	127
++
++/* Server fsid linked list for NLM lock failover */
++struct fo_fsid {
++	struct list_head	g_list;		/* linked list */
++	unsigned long		g_expire;	/* when this grace period
++						 * will expire */
++	int			g_fsid;		/* exported fsid */
++	int			g_flag;		/* printk flag */
++};
++
+ /*
+  * This is a server block (i.e. a lock requested by some client which
+  * couldn't be granted because of a conflicting lock).
+@@ -187,6 +198,8 @@ void		  nlmsvc_traverse_blocks(struct nl
+ 					int action);
+ void	  nlmsvc_grant_reply(struct svc_rqst *, struct nlm_cookie *, u32);
+ 
++unsigned long set_grace_period(void); /*required by svcsubs.c and svc.c 
++					to support nlm failover */
+ /*
+  * File handling for the server personality
+  */
+@@ -197,6 +210,7 @@ void		  nlmsvc_mark_resources(void);
+ void		  nlmsvc_free_host_resources(struct nlm_host *);
+ void		  nlmsvc_invalidate_all(void);
+ int 		  nlmsvc_fo_unlock(int *fsid);
++int 		  nlmsvc_fo_check(struct nfs_fh *fh);
+ 
+ static __inline__ struct inode *
+ nlmsvc_file_inode(struct nlm_file *file)
+--- linux-1/fs/lockd/svcsubs.c	2006-09-13 13:48:01.000000000 -0400
++++ linux-2/fs/lockd/svcsubs.c	2006-09-13 22:50:51.000000000 -0400
+@@ -32,6 +32,13 @@
+ static struct nlm_file *	nlm_files[FILE_NRHASH];
+ static DEFINE_MUTEX(nlm_file_mutex);
+ 
++/* 
++ * Global control structure for lock failover 
++ */
++static spinlock_t nlm_fo_lock=SPIN_LOCK_UNLOCKED;
++static int fo_fsid_cnt=0;
++LIST_HEAD(fo_fsid_list);
++
+ #ifdef NFSD_DEBUG
+ static inline void nlm_debug_print_fh(char *msg, struct nfs_fh *f)
+ {
+@@ -403,3 +410,176 @@ nlmsvc_fo_unlock(int *fsid)
+ 	return (nlm_traverse_files(NULL, fsid, NLM_ACT_FO_UNLOCK)); 
+ }
+ 
++EXPORT_SYMBOL(nlmsvc_fo_setgrace);
++
++/*
++ * Add fsid into global fo_fsid_list (single linked list).
++ *
++ * Note that if this routine is repeatedly called with the very 
++ * same fsid, we could end up with multiple fsid in the global 
++ * fo_fsid_list. Instead of searching thru the list to purge old
++ * entries (to make the code un-necessarily complicated), we 
++ * will just leave the old entries there because the list is
++ * searched in top-down order (newer entry first). As soon as one 
++ * is found, the search stops. This implies the older entries will 
++ * not be used and always expire before new entry.    
++ *
++ * As an admin interface, the list is expected to be short and 
++ * entries are purged (expired) quickly.
++ *
++ * Also, please don't ask why using opencoded list manipulation, 
++ * instead of <linux/list.h>, unless you can point to me where
++ * in that file have existing macro and/or functions that can do
++ * single linked list. 
++ */
++int
++nlmsvc_fo_setgrace(int fsid)
++{
++	struct list_head *p, *tlist;
++	struct fo_fsid *per_fsid, *entry;
++	int done=0;
++
++	/* allocate the entry */
++	per_fsid = kmalloc(sizeof(struct fo_fsid), GFP_KERNEL);
++	if (per_fsid == NULL) {
++		printk("lockd: nlmsvc_fo_setgrace kmalloc fails\n");
++		return(-ENOMEM);
++	}
++
++	/* debug printk */
++	dprintk("lockd: nlmsvc_fo_setgrace fsid=%d jiffies=%lu\n", 
++		fsid, jiffies);
++
++	/* fill in info */
++	per_fsid->g_expire = set_grace_period();
++	per_fsid->g_fsid   = fsid;
++	per_fsid->g_flag   = 0;
++
++	spin_lock(&nlm_fo_lock);
++
++	if (list_empty(&fo_fsid_list)) {
++		list_add(&per_fsid->g_list, &fo_fsid_list);
++		fo_fsid_cnt = 1;
++		done = 1;
++		goto nlmsvc_fo_setgrace_out;
++	} else if (fo_fsid_cnt > NLM_FO_MAX_FSID_GP) {
++                kfree(per_fsid);
++                printk("lockd: fo_setgrace max cnt reached fsid=%d not added\n",                        fsid);
++                goto nlmsvc_fo_setgrace_out;
++        }
++
++	list_for_each_safe(p, tlist, &fo_fsid_list) {
++		entry = list_entry(p, struct fo_fsid, g_list);
++		if (!done) {
++			/* add the new fsid into the list */
++			if (entry->g_expire <= per_fsid->g_expire) {
++				list_add(&per_fsid->g_list, &entry->g_list);
++				fo_fsid_cnt++;
++				done = 1;
++			}
++		}
++		if (done && (entry->g_fsid == fsid)) {
++			/* multiple fsid(s) */
++			BUG_ON(entry->g_expire > per_fsid->g_expire); 
++			list_del(p); 
++			fo_fsid_cnt--;
++			kfree(entry);
++		} else if (time_before(entry->g_expire, jiffies)) {
++			/* garbage collection */
++			printk("nlmsvc fo_fsid = %d expires\n", entry->g_fsid);
++			list_del(p);
++			fo_fsid_cnt--;
++			kfree(entry);
++		} 
++	}
++	
++nlmsvc_fo_setgrace_out:
++
++	spin_unlock(&nlm_fo_lock);
++
++	/* debug */
++	if (done)
++		printk("nlmsvc fo setgrace: fsid=%d, jiffies=%lu, expire=%lu\n",
++			per_fsid->g_fsid, jiffies, per_fsid->g_expire);
++	else
++		printk("nlmsvc_fo_setgrace: adding fsid=%d fails\n", fsid);
++
++	return 0;
++}
++
++/* 
++ * Reset global fo_fsid_list list 
++ */
++void 
++nlmsvc_fo_reset_servs()
++{
++	struct fo_fsid *e_purge;
++	struct list_head *p, *tlist;
++
++	spin_lock(&nlm_fo_lock);
++
++	/* nothing to do */
++	if (list_empty(&fo_fsid_list)) {
++		spin_unlock(&nlm_fo_lock);
++		return;
++	}
++
++	dprintk("lockd: nlmsvc_fo_reset fo_fsid_list\n");
++
++	/* purge the entries */
++	list_for_each_safe(p, tlist, &fo_fsid_list) {
++		e_purge = list_entry(p, struct fo_fsid, g_list);
++		list_del(p);
++		kfree(e_purge);
++	}
++	fo_fsid_cnt = 0;
++
++	spin_unlock(&nlm_fo_lock);
++}
++
++/*
++ * Check whether the fsid is in the failover list: fo_fsid_list.
++ *	return TRUE (1) if fsid in nlm_serv.
++ */
++int
++nlmsvc_fo_check(struct nfs_fh *fh)
++{
++	struct fo_fsid *e_this;
++	struct list_head *p, *tlist;
++	int rc=0, this_fsid;
++
++	/* see if this fh has fsid */
++	if (!nlm_fo_get_fsid(fh, &this_fsid)) {
++		return 0;
++	}
++
++	spin_lock(&nlm_fo_lock);
++
++	/* no failover entry */
++	if (list_empty(&fo_fsid_list))  
++		goto nlmsvc_fo_check_out;
++
++	/* check to see whether this_fsid is in fo_fsid_list list */
++	list_for_each_safe(p, tlist, &fo_fsid_list) {
++		e_this = list_entry(p, struct fo_fsid, g_list);
++		if (time_before(e_this->g_expire, jiffies)) {
++			printk("lockd: fsid=%d grace period expires\n",
++				e_this->g_fsid);
++			list_del(p);
++			fo_fsid_cnt--;
++			kfree(e_this);
++		} else if (e_this->g_fsid == this_fsid) {
++			if (!e_this->g_flag) {
++				e_this->g_flag = 1;
++				printk("lockd: fsid=%d in grace period\n",
++					e_this->g_fsid);
++			}
++			rc = 1;
++		}
++	}
++
++nlmsvc_fo_check_out:
++	spin_unlock(&nlm_fo_lock);
++	return rc;
++}
++
+--- linux-1/include/linux/lockd/bind.h	2006-09-03 21:51:41.000000000 -0400
++++ linux-2/include/linux/lockd/bind.h	2006-09-11 16:52:34.000000000 -0400
+@@ -37,5 +37,8 @@ extern void	lockd_down(void);
+  * NLM failover
+  */
+ extern int     nlmsvc_fo_unlock(int *fsid);
++extern int     nlmsvc_fo_setgrace(int fsid);
++extern void    nlmsvc_fo_reset_servs(void);
++
+ 
+ #endif /* LINUX_LOCKD_BIND_H */
+--- linux-1/fs/nfsd/nfsctl.c	2006-09-03 21:51:40.000000000 -0400
++++ linux-2/fs/nfsd/nfsctl.c	2006-09-11 16:52:25.000000000 -0400
+@@ -56,6 +56,7 @@ enum {
+ 	NFSD_List,
+ 	NFSD_Fh,
+ 	NFSD_NlmUnlock,
++	NFSD_NlmIgrace,
+ 	NFSD_Threads,
+ 	NFSD_Versions,
+ 	/*
+@@ -93,6 +94,7 @@ static ssize_t write_recoverydir(struct 
+ #define NFSDDBG_FACILITY	NFSDDBG_CLUSTER
+ 
+ static ssize_t write_fo_unlock(struct file *file, char *buf, size_t size);
++static ssize_t write_fo_grace(struct file *file, char *buf, size_t size);
+ 
+ static ssize_t (*write_op[])(struct file *, char *, size_t) = {
+ 	[NFSD_Svc] = write_svc,
+@@ -104,6 +106,7 @@ static ssize_t (*write_op[])(struct file
+ 	[NFSD_Getfs] = write_getfs,
+ 	[NFSD_Fh] = write_filehandle,
+ 	[NFSD_NlmUnlock] = write_fo_unlock,
++	[NFSD_NlmIgrace] = write_fo_grace,
+ 	[NFSD_Threads] = write_threads,
+ 	[NFSD_Versions] = write_versions,
+ #ifdef CONFIG_NFSD_V4
+@@ -375,6 +378,34 @@ static ssize_t write_fo_unlock(struct fi
+ 	return strlen(buf);
+ }
+ 
++static ssize_t write_fo_grace(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("do_nlm_fsid_grace: invalid fsid (%s)\n", buf);
++		return rc;
++	}
++ 
++	/* call nlm to set the grace period */
++	rc = nlmsvc_fo_setgrace(fsid);
++	if (rc) {
++		dprintk("nlmsvc_fo_setgrace return rc=%d\n", rc);
++		return rc;
++	}
++ 
++	dprintk("nlm set fsid=%d grace period\n", fsid);
++ 
++	/* done */
++	sprintf(buf, "nlm set per fsid=%d grace period\n", fsid);
++	return strlen(buf);
++}
++
+ extern int nfsd_nrthreads(void);
+ 
+ static ssize_t write_threads(struct file *file, char *buf, size_t size)
+@@ -524,6 +555,7 @@ static int nfsd_fill_super(struct super_
+ 		[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_NlmIgrace] = {"nlm_set_igrace", &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-1/fs/lockd/svc4proc.c	2006-09-13 13:49:35.000000000 -0400
++++ linux-2/fs/lockd/svc4proc.c	2006-09-13 14:03:39.000000000 -0400
+@@ -18,9 +18,22 @@
+ #include <linux/lockd/share.h>
+ #include <linux/lockd/sm_inter.h>
+ 
+-
+ #define NLMDBG_FACILITY		NLMDBG_CLIENT
+ 
++extern struct list_head fo_fsid_list;
++
++/* 
++ * Check for per filesystem failover grace period 
++ */
++static inline int
++nlm4svc_fo_grace_period(struct nlm_args *argp) 
++{
++	if (unlikely(!list_empty(&fo_fsid_list)))
++		return(nlmsvc_fo_check(&argp->lock.fh));
++
++	return 0;
++}
++
+ /*
+  * Obtain client and file from arguments
+  */
+@@ -89,7 +102,7 @@ nlm4svc_proc_test(struct svc_rqst *rqstp
+ 	resp->cookie = argp->cookie;
+ 
+ 	/* Don't accept test requests during grace period */
+-	if (nlmsvc_grace_period) {
++	if ((nlmsvc_grace_period) || (nlm4svc_fo_grace_period(argp))) {
+ 		resp->status = nlm_lck_denied_grace_period;
+ 		return rpc_success;
+ 	}
+@@ -119,7 +132,8 @@ nlm4svc_proc_lock(struct svc_rqst *rqstp
+ 	resp->cookie = argp->cookie;
+ 
+ 	/* Don't accept new lock requests during grace period */
+-	if (nlmsvc_grace_period && !argp->reclaim) {
++	if ((nlmsvc_grace_period || (nlm4svc_fo_grace_period(argp))) 
++			&& !argp->reclaim) {
+ 		resp->status = nlm_lck_denied_grace_period;
+ 		return rpc_success;
+ 	}
+@@ -162,7 +176,7 @@ nlm4svc_proc_cancel(struct svc_rqst *rqs
+ 	resp->cookie = argp->cookie;
+ 
+ 	/* Don't accept requests during grace period */
+-	if (nlmsvc_grace_period) {
++	if ((nlmsvc_grace_period || (nlm4svc_fo_grace_period(argp)))) {
+ 		resp->status = nlm_lck_denied_grace_period;
+ 		return rpc_success;
+ 	}
+@@ -195,7 +209,7 @@ nlm4svc_proc_unlock(struct svc_rqst *rqs
+ 	resp->cookie = argp->cookie;
+ 
+ 	/* Don't accept new lock requests during grace period */
+-	if (nlmsvc_grace_period) {
++	if (nlmsvc_grace_period || (nlm4svc_fo_grace_period(argp))) {
+ 		resp->status = nlm_lck_denied_grace_period;
+ 		return rpc_success;
+ 	}
+@@ -330,7 +344,7 @@ nlm4svc_proc_share(struct svc_rqst *rqst
+ 	resp->cookie = argp->cookie;
+ 
+ 	/* Don't accept new lock requests during grace period */
+-	if (nlmsvc_grace_period && !argp->reclaim) {
++	if ((nlmsvc_grace_period ||(nlm4svc_fo_grace_period(argp))) && !argp->reclaim) {
+ 		resp->status = nlm_lck_denied_grace_period;
+ 		return rpc_success;
+ 	}
+@@ -363,7 +377,7 @@ nlm4svc_proc_unshare(struct svc_rqst *rq
+ 	resp->cookie = argp->cookie;
+ 
+ 	/* Don't accept requests during grace period */
+-	if (nlmsvc_grace_period) {
++	if (nlmsvc_grace_period || (nlm4svc_fo_grace_period(argp))) {
+ 		resp->status = nlm_lck_denied_grace_period;
+ 		return rpc_success;
+ 	}
+--- linux-1/fs/lockd/svcproc.c	2006-09-03 21:51:39.000000000 -0400
++++ linux-2/fs/lockd/svcproc.c	2006-09-13 13:51:59.000000000 -0400
+@@ -50,6 +50,21 @@ cast_to_nlm(u32 status, u32 vers)
+ #endif
+ 
+ /*
++ * Check for per filesystem failover grace period 
++ */
++
++extern struct list_head fo_fsid_list;
++
++int inline
++nlmsvc_fo_grace_period(struct nlm_args *argp)
++{
++	if (unlikely(!list_empty(&fo_fsid_list)))
++		return(nlmsvc_fo_check(&argp->lock.fh));
++
++	return 0;
++}
++
++/*
+  * Obtain client and file from arguments
+  */
+ static u32
+@@ -115,7 +130,7 @@ nlmsvc_proc_test(struct svc_rqst *rqstp,
+ 	resp->cookie = argp->cookie;
+ 
+ 	/* Don't accept test requests during grace period */
+-	if (nlmsvc_grace_period) {
++	if (nlmsvc_grace_period || (nlmsvc_fo_grace_period(argp))) {
+ 		resp->status = nlm_lck_denied_grace_period;
+ 		return rpc_success;
+ 	}
+@@ -146,7 +161,8 @@ nlmsvc_proc_lock(struct svc_rqst *rqstp,
+ 	resp->cookie = argp->cookie;
+ 
+ 	/* Don't accept new lock requests during grace period */
+-	if (nlmsvc_grace_period && !argp->reclaim) {
++	if ((nlmsvc_grace_period || (nlmsvc_fo_grace_period(argp))) 
++			&& !argp->reclaim) {
+ 		resp->status = nlm_lck_denied_grace_period;
+ 		return rpc_success;
+ 	}
+@@ -189,7 +205,7 @@ nlmsvc_proc_cancel(struct svc_rqst *rqst
+ 	resp->cookie = argp->cookie;
+ 
+ 	/* Don't accept requests during grace period */
+-	if (nlmsvc_grace_period) {
++	if (nlmsvc_grace_period || nlmsvc_fo_grace_period(argp)) {
+ 		resp->status = nlm_lck_denied_grace_period;
+ 		return rpc_success;
+ 	}
+@@ -222,7 +238,7 @@ nlmsvc_proc_unlock(struct svc_rqst *rqst
+ 	resp->cookie = argp->cookie;
+ 
+ 	/* Don't accept new lock requests during grace period */
+-	if (nlmsvc_grace_period) {
++	if (nlmsvc_grace_period || nlmsvc_fo_grace_period(argp)) {
+ 		resp->status = nlm_lck_denied_grace_period;
+ 		return rpc_success;
+ 	}
+@@ -359,7 +375,8 @@ nlmsvc_proc_share(struct svc_rqst *rqstp
+ 	resp->cookie = argp->cookie;
+ 
+ 	/* Don't accept new lock requests during grace period */
+-	if (nlmsvc_grace_period && !argp->reclaim) {
++	if ((nlmsvc_grace_period || (nlmsvc_fo_grace_period(argp))) 
++			&& !argp->reclaim) {
+ 		resp->status = nlm_lck_denied_grace_period;
+ 		return rpc_success;
+ 	}
+@@ -392,7 +409,7 @@ nlmsvc_proc_unshare(struct svc_rqst *rqs
+ 	resp->cookie = argp->cookie;
+ 
+ 	/* Don't accept requests during grace period */
+-	if (nlmsvc_grace_period) {
++	if (nlmsvc_grace_period || nlmsvc_fo_grace_period(argp)) {
+ 		resp->status = nlm_lck_denied_grace_period;
+ 		return rpc_success;
+ 	}
+--- linux-1/fs/lockd/svc.c	2006-09-03 21:51:39.000000000 -0400
++++ linux-2/fs/lockd/svc.c	2006-09-11 16:51:58.000000000 -0400
+@@ -71,7 +71,7 @@ static const int		nlm_port_min = 0, nlm_
+ 
+ static struct ctl_table_header * nlm_sysctl_table;
+ 
+-static unsigned long set_grace_period(void)
++unsigned long set_grace_period(void)
+ {
+ 	unsigned long grace_period;
+ 
+@@ -81,7 +81,6 @@ static unsigned long set_grace_period(vo
+ 				/ nlm_timeout) * nlm_timeout * HZ;
+ 	else
+ 		grace_period = nlm_timeout * 5 * HZ;
+-	nlmsvc_grace_period = 1;
+ 	return grace_period + jiffies;
+ }
+ 
+@@ -129,6 +128,8 @@ lockd(struct svc_rqst *rqstp)
+ 	nlmsvc_timeout = nlm_timeout * HZ;
+ 
+ 	grace_period_expire = set_grace_period();
++	nlmsvc_grace_period = 1;
++	(void) nlmsvc_fo_reset_servs();
+ 
+ 	/*
+ 	 * The main request loop. We don't terminate until the last
+@@ -143,6 +144,8 @@ lockd(struct svc_rqst *rqstp)
+ 			if (nlmsvc_ops) {
+ 				nlmsvc_invalidate_all();
+ 				grace_period_expire = set_grace_period();
++				nlmsvc_grace_period = 1;
++				(void) nlmsvc_fo_reset_servs();
+ 			}
+ 		}
+ 
+@@ -189,6 +192,7 @@ lockd(struct svc_rqst *rqstp)
+ 			nlmsvc_invalidate_all();
+ 		nlm_shutdown_hosts();
+ 		nlmsvc_pid = 0;
++		(void) nlmsvc_fo_reset_servs();
+ 	} else
+ 		printk(KERN_DEBUG
+ 			"lockd: new process, skipping host shutdown\n");
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 e0db80c..9bd42f6 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 2/4 Revised] NLM failover - nlm_set_igrace\0"
+ "Subject\0[PATCH 2/4 Revised] NLM failover - nlm_set_igrace\0"
  "Date\0Thu, 14 Sep 2006 00:48:26 -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"
  "This change enables per NFS-export entry lockd grace period. The \n"
  "implementation is based on a double linked list fo_fsid_list that \n"
@@ -25,14 +27,537 @@
  " fs/nfsd/nfsctl.c            |   32 +++++++\n"
  " include/linux/lockd/bind.h  |    3\n"
  " include/linux/lockd/lockd.h |   14 +++\n"
- " 7 files changed, 279 insertions(+), 15 deletions(-)\n"
- "\n"
- "-------------- next part --------------\n"
- "A non-text attachment was scrubbed...\n"
- "Name: gfs_nlm_igrace.patch\n"
- "Type: text/x-patch\n"
- "Size: 15444 bytes\n"
- "Desc: not available\n"
- URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20060914/3cf5f3ed/attachment.bin>
+  7 files changed, 279 insertions(+), 15 deletions(-)
+ "\01:2\0"
+ "fn\0gfs_nlm_igrace.patch\0"
+ "b\0"
+ "--- linux-1/include/linux/lockd/lockd.h\t2006-09-03 21:51:41.000000000 -0400\n"
+ "+++ linux-2/include/linux/lockd/lockd.h\t2006-09-13 22:48:00.000000000 -0400\n"
+ "@@ -107,6 +107,17 @@ struct nlm_file {\n"
+ " \tint\t\t       \tf_hash;\t\t/* hash of f_handle */\n"
+ " };\n"
+ " \n"
+ "+#define NLM_FO_MAX_FSID_GP\t127\n"
+ "+\n"
+ "+/* Server fsid linked list for NLM lock failover */\n"
+ "+struct fo_fsid {\n"
+ "+\tstruct list_head\tg_list;\t\t/* linked list */\n"
+ "+\tunsigned long\t\tg_expire;\t/* when this grace period\n"
+ "+\t\t\t\t\t\t * will expire */\n"
+ "+\tint\t\t\tg_fsid;\t\t/* exported fsid */\n"
+ "+\tint\t\t\tg_flag;\t\t/* printk flag */\n"
+ "+};\n"
+ "+\n"
+ " /*\n"
+ "  * This is a server block (i.e. a lock requested by some client which\n"
+ "  * couldn't be granted because of a conflicting lock).\n"
+ "@@ -187,6 +198,8 @@ void\t\t  nlmsvc_traverse_blocks(struct nl\n"
+ " \t\t\t\t\tint action);\n"
+ " void\t  nlmsvc_grant_reply(struct svc_rqst *, struct nlm_cookie *, u32);\n"
+ " \n"
+ "+unsigned long set_grace_period(void); /*required by svcsubs.c and svc.c \n"
+ "+\t\t\t\t\tto support nlm failover */\n"
+ " /*\n"
+ "  * File handling for the server personality\n"
+ "  */\n"
+ "@@ -197,6 +210,7 @@ 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"
+ "+int \t\t  nlmsvc_fo_check(struct nfs_fh *fh);\n"
+ " \n"
+ " static __inline__ struct inode *\n"
+ " nlmsvc_file_inode(struct nlm_file *file)\n"
+ "--- linux-1/fs/lockd/svcsubs.c\t2006-09-13 13:48:01.000000000 -0400\n"
+ "+++ linux-2/fs/lockd/svcsubs.c\t2006-09-13 22:50:51.000000000 -0400\n"
+ "@@ -32,6 +32,13 @@\n"
+ " static struct nlm_file *\tnlm_files[FILE_NRHASH];\n"
+ " static DEFINE_MUTEX(nlm_file_mutex);\n"
+ " \n"
+ "+/* \n"
+ "+ * Global control structure for lock failover \n"
+ "+ */\n"
+ "+static spinlock_t nlm_fo_lock=SPIN_LOCK_UNLOCKED;\n"
+ "+static int fo_fsid_cnt=0;\n"
+ "+LIST_HEAD(fo_fsid_list);\n"
+ "+\n"
+ " #ifdef NFSD_DEBUG\n"
+ " static inline void nlm_debug_print_fh(char *msg, struct nfs_fh *f)\n"
+ " {\n"
+ "@@ -403,3 +410,176 @@ nlmsvc_fo_unlock(int *fsid)\n"
+ " \treturn (nlm_traverse_files(NULL, fsid, NLM_ACT_FO_UNLOCK)); \n"
+ " }\n"
+ " \n"
+ "+EXPORT_SYMBOL(nlmsvc_fo_setgrace);\n"
+ "+\n"
+ "+/*\n"
+ "+ * Add fsid into global fo_fsid_list (single linked list).\n"
+ "+ *\n"
+ "+ * Note that if this routine is repeatedly called with the very \n"
+ "+ * same fsid, we could end up with multiple fsid in the global \n"
+ "+ * fo_fsid_list. Instead of searching thru the list to purge old\n"
+ "+ * entries (to make the code un-necessarily complicated), we \n"
+ "+ * will just leave the old entries there because the list is\n"
+ "+ * searched in top-down order (newer entry first). As soon as one \n"
+ "+ * is found, the search stops. This implies the older entries will \n"
+ "+ * not be used and always expire before new entry.    \n"
+ "+ *\n"
+ "+ * As an admin interface, the list is expected to be short and \n"
+ "+ * entries are purged (expired) quickly.\n"
+ "+ *\n"
+ "+ * Also, please don't ask why using opencoded list manipulation, \n"
+ "+ * instead of <linux/list.h>, unless you can point to me where\n"
+ "+ * in that file have existing macro and/or functions that can do\n"
+ "+ * single linked list. \n"
+ "+ */\n"
+ "+int\n"
+ "+nlmsvc_fo_setgrace(int fsid)\n"
+ "+{\n"
+ "+\tstruct list_head *p, *tlist;\n"
+ "+\tstruct fo_fsid *per_fsid, *entry;\n"
+ "+\tint done=0;\n"
+ "+\n"
+ "+\t/* allocate the entry */\n"
+ "+\tper_fsid = kmalloc(sizeof(struct fo_fsid), GFP_KERNEL);\n"
+ "+\tif (per_fsid == NULL) {\n"
+ "+\t\tprintk(\"lockd: nlmsvc_fo_setgrace kmalloc fails\\n\");\n"
+ "+\t\treturn(-ENOMEM);\n"
+ "+\t}\n"
+ "+\n"
+ "+\t/* debug printk */\n"
+ "+\tdprintk(\"lockd: nlmsvc_fo_setgrace fsid=%d jiffies=%lu\\n\", \n"
+ "+\t\tfsid, jiffies);\n"
+ "+\n"
+ "+\t/* fill in info */\n"
+ "+\tper_fsid->g_expire = set_grace_period();\n"
+ "+\tper_fsid->g_fsid   = fsid;\n"
+ "+\tper_fsid->g_flag   = 0;\n"
+ "+\n"
+ "+\tspin_lock(&nlm_fo_lock);\n"
+ "+\n"
+ "+\tif (list_empty(&fo_fsid_list)) {\n"
+ "+\t\tlist_add(&per_fsid->g_list, &fo_fsid_list);\n"
+ "+\t\tfo_fsid_cnt = 1;\n"
+ "+\t\tdone = 1;\n"
+ "+\t\tgoto nlmsvc_fo_setgrace_out;\n"
+ "+\t} else if (fo_fsid_cnt > NLM_FO_MAX_FSID_GP) {\n"
+ "+                kfree(per_fsid);\n"
+ "+                printk(\"lockd: fo_setgrace max cnt reached fsid=%d not added\\n\",                        fsid);\n"
+ "+                goto nlmsvc_fo_setgrace_out;\n"
+ "+        }\n"
+ "+\n"
+ "+\tlist_for_each_safe(p, tlist, &fo_fsid_list) {\n"
+ "+\t\tentry = list_entry(p, struct fo_fsid, g_list);\n"
+ "+\t\tif (!done) {\n"
+ "+\t\t\t/* add the new fsid into the list */\n"
+ "+\t\t\tif (entry->g_expire <= per_fsid->g_expire) {\n"
+ "+\t\t\t\tlist_add(&per_fsid->g_list, &entry->g_list);\n"
+ "+\t\t\t\tfo_fsid_cnt++;\n"
+ "+\t\t\t\tdone = 1;\n"
+ "+\t\t\t}\n"
+ "+\t\t}\n"
+ "+\t\tif (done && (entry->g_fsid == fsid)) {\n"
+ "+\t\t\t/* multiple fsid(s) */\n"
+ "+\t\t\tBUG_ON(entry->g_expire > per_fsid->g_expire); \n"
+ "+\t\t\tlist_del(p); \n"
+ "+\t\t\tfo_fsid_cnt--;\n"
+ "+\t\t\tkfree(entry);\n"
+ "+\t\t} else if (time_before(entry->g_expire, jiffies)) {\n"
+ "+\t\t\t/* garbage collection */\n"
+ "+\t\t\tprintk(\"nlmsvc fo_fsid = %d expires\\n\", entry->g_fsid);\n"
+ "+\t\t\tlist_del(p);\n"
+ "+\t\t\tfo_fsid_cnt--;\n"
+ "+\t\t\tkfree(entry);\n"
+ "+\t\t} \n"
+ "+\t}\n"
+ "+\t\n"
+ "+nlmsvc_fo_setgrace_out:\n"
+ "+\n"
+ "+\tspin_unlock(&nlm_fo_lock);\n"
+ "+\n"
+ "+\t/* debug */\n"
+ "+\tif (done)\n"
+ "+\t\tprintk(\"nlmsvc fo setgrace: fsid=%d, jiffies=%lu, expire=%lu\\n\",\n"
+ "+\t\t\tper_fsid->g_fsid, jiffies, per_fsid->g_expire);\n"
+ "+\telse\n"
+ "+\t\tprintk(\"nlmsvc_fo_setgrace: adding fsid=%d fails\\n\", fsid);\n"
+ "+\n"
+ "+\treturn 0;\n"
+ "+}\n"
+ "+\n"
+ "+/* \n"
+ "+ * Reset global fo_fsid_list list \n"
+ "+ */\n"
+ "+void \n"
+ "+nlmsvc_fo_reset_servs()\n"
+ "+{\n"
+ "+\tstruct fo_fsid *e_purge;\n"
+ "+\tstruct list_head *p, *tlist;\n"
+ "+\n"
+ "+\tspin_lock(&nlm_fo_lock);\n"
+ "+\n"
+ "+\t/* nothing to do */\n"
+ "+\tif (list_empty(&fo_fsid_list)) {\n"
+ "+\t\tspin_unlock(&nlm_fo_lock);\n"
+ "+\t\treturn;\n"
+ "+\t}\n"
+ "+\n"
+ "+\tdprintk(\"lockd: nlmsvc_fo_reset fo_fsid_list\\n\");\n"
+ "+\n"
+ "+\t/* purge the entries */\n"
+ "+\tlist_for_each_safe(p, tlist, &fo_fsid_list) {\n"
+ "+\t\te_purge = list_entry(p, struct fo_fsid, g_list);\n"
+ "+\t\tlist_del(p);\n"
+ "+\t\tkfree(e_purge);\n"
+ "+\t}\n"
+ "+\tfo_fsid_cnt = 0;\n"
+ "+\n"
+ "+\tspin_unlock(&nlm_fo_lock);\n"
+ "+}\n"
+ "+\n"
+ "+/*\n"
+ "+ * Check whether the fsid is in the failover list: fo_fsid_list.\n"
+ "+ *\treturn TRUE (1) if fsid in nlm_serv.\n"
+ "+ */\n"
+ "+int\n"
+ "+nlmsvc_fo_check(struct nfs_fh *fh)\n"
+ "+{\n"
+ "+\tstruct fo_fsid *e_this;\n"
+ "+\tstruct list_head *p, *tlist;\n"
+ "+\tint rc=0, this_fsid;\n"
+ "+\n"
+ "+\t/* see if this fh has fsid */\n"
+ "+\tif (!nlm_fo_get_fsid(fh, &this_fsid)) {\n"
+ "+\t\treturn 0;\n"
+ "+\t}\n"
+ "+\n"
+ "+\tspin_lock(&nlm_fo_lock);\n"
+ "+\n"
+ "+\t/* no failover entry */\n"
+ "+\tif (list_empty(&fo_fsid_list))  \n"
+ "+\t\tgoto nlmsvc_fo_check_out;\n"
+ "+\n"
+ "+\t/* check to see whether this_fsid is in fo_fsid_list list */\n"
+ "+\tlist_for_each_safe(p, tlist, &fo_fsid_list) {\n"
+ "+\t\te_this = list_entry(p, struct fo_fsid, g_list);\n"
+ "+\t\tif (time_before(e_this->g_expire, jiffies)) {\n"
+ "+\t\t\tprintk(\"lockd: fsid=%d grace period expires\\n\",\n"
+ "+\t\t\t\te_this->g_fsid);\n"
+ "+\t\t\tlist_del(p);\n"
+ "+\t\t\tfo_fsid_cnt--;\n"
+ "+\t\t\tkfree(e_this);\n"
+ "+\t\t} else if (e_this->g_fsid == this_fsid) {\n"
+ "+\t\t\tif (!e_this->g_flag) {\n"
+ "+\t\t\t\te_this->g_flag = 1;\n"
+ "+\t\t\t\tprintk(\"lockd: fsid=%d in grace period\\n\",\n"
+ "+\t\t\t\t\te_this->g_fsid);\n"
+ "+\t\t\t}\n"
+ "+\t\t\trc = 1;\n"
+ "+\t\t}\n"
+ "+\t}\n"
+ "+\n"
+ "+nlmsvc_fo_check_out:\n"
+ "+\tspin_unlock(&nlm_fo_lock);\n"
+ "+\treturn rc;\n"
+ "+}\n"
+ "+\n"
+ "--- linux-1/include/linux/lockd/bind.h\t2006-09-03 21:51:41.000000000 -0400\n"
+ "+++ linux-2/include/linux/lockd/bind.h\t2006-09-11 16:52:34.000000000 -0400\n"
+ "@@ -37,5 +37,8 @@ extern void\tlockd_down(void);\n"
+ "  * NLM failover\n"
+ "  */\n"
+ " extern int     nlmsvc_fo_unlock(int *fsid);\n"
+ "+extern int     nlmsvc_fo_setgrace(int fsid);\n"
+ "+extern void    nlmsvc_fo_reset_servs(void);\n"
+ "+\n"
+ " \n"
+ " #endif /* LINUX_LOCKD_BIND_H */\n"
+ "--- linux-1/fs/nfsd/nfsctl.c\t2006-09-03 21:51:40.000000000 -0400\n"
+ "+++ linux-2/fs/nfsd/nfsctl.c\t2006-09-11 16:52:25.000000000 -0400\n"
+ "@@ -56,6 +56,7 @@ enum {\n"
+ " \tNFSD_List,\n"
+ " \tNFSD_Fh,\n"
+ " \tNFSD_NlmUnlock,\n"
+ "+\tNFSD_NlmIgrace,\n"
+ " \tNFSD_Threads,\n"
+ " \tNFSD_Versions,\n"
+ " \t/*\n"
+ "@@ -93,6 +94,7 @@ static ssize_t write_recoverydir(struct \n"
+ " #define NFSDDBG_FACILITY\tNFSDDBG_CLUSTER\n"
+ " \n"
+ " static ssize_t write_fo_unlock(struct file *file, char *buf, size_t size);\n"
+ "+static ssize_t write_fo_grace(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"
+ "@@ -104,6 +106,7 @@ static ssize_t (*write_op[])(struct file\n"
+ " \t[NFSD_Getfs] = write_getfs,\n"
+ " \t[NFSD_Fh] = write_filehandle,\n"
+ " \t[NFSD_NlmUnlock] = write_fo_unlock,\n"
+ "+\t[NFSD_NlmIgrace] = write_fo_grace,\n"
+ " \t[NFSD_Threads] = write_threads,\n"
+ " \t[NFSD_Versions] = write_versions,\n"
+ " #ifdef CONFIG_NFSD_V4\n"
+ "@@ -375,6 +378,34 @@ static ssize_t write_fo_unlock(struct fi\n"
+ " \treturn strlen(buf);\n"
+ " }\n"
+ " \n"
+ "+static ssize_t write_fo_grace(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(\"do_nlm_fsid_grace: invalid fsid (%s)\\n\", buf);\n"
+ "+\t\treturn rc;\n"
+ "+\t}\n"
+ "+ \n"
+ "+\t/* call nlm to set the grace period */\n"
+ "+\trc = nlmsvc_fo_setgrace(fsid);\n"
+ "+\tif (rc) {\n"
+ "+\t\tdprintk(\"nlmsvc_fo_setgrace return rc=%d\\n\", rc);\n"
+ "+\t\treturn rc;\n"
+ "+\t}\n"
+ "+ \n"
+ "+\tdprintk(\"nlm set fsid=%d grace period\\n\", fsid);\n"
+ "+ \n"
+ "+\t/* done */\n"
+ "+\tsprintf(buf, \"nlm set per fsid=%d grace period\\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"
+ "@@ -524,6 +555,7 @@ static int nfsd_fill_super(struct super_\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_NlmIgrace] = {\"nlm_set_igrace\", &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-1/fs/lockd/svc4proc.c\t2006-09-13 13:49:35.000000000 -0400\n"
+ "+++ linux-2/fs/lockd/svc4proc.c\t2006-09-13 14:03:39.000000000 -0400\n"
+ "@@ -18,9 +18,22 @@\n"
+ " #include <linux/lockd/share.h>\n"
+ " #include <linux/lockd/sm_inter.h>\n"
+ " \n"
+ "-\n"
+ " #define NLMDBG_FACILITY\t\tNLMDBG_CLIENT\n"
+ " \n"
+ "+extern struct list_head fo_fsid_list;\n"
+ "+\n"
+ "+/* \n"
+ "+ * Check for per filesystem failover grace period \n"
+ "+ */\n"
+ "+static inline int\n"
+ "+nlm4svc_fo_grace_period(struct nlm_args *argp) \n"
+ "+{\n"
+ "+\tif (unlikely(!list_empty(&fo_fsid_list)))\n"
+ "+\t\treturn(nlmsvc_fo_check(&argp->lock.fh));\n"
+ "+\n"
+ "+\treturn 0;\n"
+ "+}\n"
+ "+\n"
+ " /*\n"
+ "  * Obtain client and file from arguments\n"
+ "  */\n"
+ "@@ -89,7 +102,7 @@ nlm4svc_proc_test(struct svc_rqst *rqstp\n"
+ " \tresp->cookie = argp->cookie;\n"
+ " \n"
+ " \t/* Don't accept test requests during grace period */\n"
+ "-\tif (nlmsvc_grace_period) {\n"
+ "+\tif ((nlmsvc_grace_period) || (nlm4svc_fo_grace_period(argp))) {\n"
+ " \t\tresp->status = nlm_lck_denied_grace_period;\n"
+ " \t\treturn rpc_success;\n"
+ " \t}\n"
+ "@@ -119,7 +132,8 @@ nlm4svc_proc_lock(struct svc_rqst *rqstp\n"
+ " \tresp->cookie = argp->cookie;\n"
+ " \n"
+ " \t/* Don't accept new lock requests during grace period */\n"
+ "-\tif (nlmsvc_grace_period && !argp->reclaim) {\n"
+ "+\tif ((nlmsvc_grace_period || (nlm4svc_fo_grace_period(argp))) \n"
+ "+\t\t\t&& !argp->reclaim) {\n"
+ " \t\tresp->status = nlm_lck_denied_grace_period;\n"
+ " \t\treturn rpc_success;\n"
+ " \t}\n"
+ "@@ -162,7 +176,7 @@ nlm4svc_proc_cancel(struct svc_rqst *rqs\n"
+ " \tresp->cookie = argp->cookie;\n"
+ " \n"
+ " \t/* Don't accept requests during grace period */\n"
+ "-\tif (nlmsvc_grace_period) {\n"
+ "+\tif ((nlmsvc_grace_period || (nlm4svc_fo_grace_period(argp)))) {\n"
+ " \t\tresp->status = nlm_lck_denied_grace_period;\n"
+ " \t\treturn rpc_success;\n"
+ " \t}\n"
+ "@@ -195,7 +209,7 @@ nlm4svc_proc_unlock(struct svc_rqst *rqs\n"
+ " \tresp->cookie = argp->cookie;\n"
+ " \n"
+ " \t/* Don't accept new lock requests during grace period */\n"
+ "-\tif (nlmsvc_grace_period) {\n"
+ "+\tif (nlmsvc_grace_period || (nlm4svc_fo_grace_period(argp))) {\n"
+ " \t\tresp->status = nlm_lck_denied_grace_period;\n"
+ " \t\treturn rpc_success;\n"
+ " \t}\n"
+ "@@ -330,7 +344,7 @@ nlm4svc_proc_share(struct svc_rqst *rqst\n"
+ " \tresp->cookie = argp->cookie;\n"
+ " \n"
+ " \t/* Don't accept new lock requests during grace period */\n"
+ "-\tif (nlmsvc_grace_period && !argp->reclaim) {\n"
+ "+\tif ((nlmsvc_grace_period ||(nlm4svc_fo_grace_period(argp))) && !argp->reclaim) {\n"
+ " \t\tresp->status = nlm_lck_denied_grace_period;\n"
+ " \t\treturn rpc_success;\n"
+ " \t}\n"
+ "@@ -363,7 +377,7 @@ nlm4svc_proc_unshare(struct svc_rqst *rq\n"
+ " \tresp->cookie = argp->cookie;\n"
+ " \n"
+ " \t/* Don't accept requests during grace period */\n"
+ "-\tif (nlmsvc_grace_period) {\n"
+ "+\tif (nlmsvc_grace_period || (nlm4svc_fo_grace_period(argp))) {\n"
+ " \t\tresp->status = nlm_lck_denied_grace_period;\n"
+ " \t\treturn rpc_success;\n"
+ " \t}\n"
+ "--- linux-1/fs/lockd/svcproc.c\t2006-09-03 21:51:39.000000000 -0400\n"
+ "+++ linux-2/fs/lockd/svcproc.c\t2006-09-13 13:51:59.000000000 -0400\n"
+ "@@ -50,6 +50,21 @@ cast_to_nlm(u32 status, u32 vers)\n"
+ " #endif\n"
+ " \n"
+ " /*\n"
+ "+ * Check for per filesystem failover grace period \n"
+ "+ */\n"
+ "+\n"
+ "+extern struct list_head fo_fsid_list;\n"
+ "+\n"
+ "+int inline\n"
+ "+nlmsvc_fo_grace_period(struct nlm_args *argp)\n"
+ "+{\n"
+ "+\tif (unlikely(!list_empty(&fo_fsid_list)))\n"
+ "+\t\treturn(nlmsvc_fo_check(&argp->lock.fh));\n"
+ "+\n"
+ "+\treturn 0;\n"
+ "+}\n"
+ "+\n"
+ "+/*\n"
+ "  * Obtain client and file from arguments\n"
+ "  */\n"
+ " static u32\n"
+ "@@ -115,7 +130,7 @@ nlmsvc_proc_test(struct svc_rqst *rqstp,\n"
+ " \tresp->cookie = argp->cookie;\n"
+ " \n"
+ " \t/* Don't accept test requests during grace period */\n"
+ "-\tif (nlmsvc_grace_period) {\n"
+ "+\tif (nlmsvc_grace_period || (nlmsvc_fo_grace_period(argp))) {\n"
+ " \t\tresp->status = nlm_lck_denied_grace_period;\n"
+ " \t\treturn rpc_success;\n"
+ " \t}\n"
+ "@@ -146,7 +161,8 @@ nlmsvc_proc_lock(struct svc_rqst *rqstp,\n"
+ " \tresp->cookie = argp->cookie;\n"
+ " \n"
+ " \t/* Don't accept new lock requests during grace period */\n"
+ "-\tif (nlmsvc_grace_period && !argp->reclaim) {\n"
+ "+\tif ((nlmsvc_grace_period || (nlmsvc_fo_grace_period(argp))) \n"
+ "+\t\t\t&& !argp->reclaim) {\n"
+ " \t\tresp->status = nlm_lck_denied_grace_period;\n"
+ " \t\treturn rpc_success;\n"
+ " \t}\n"
+ "@@ -189,7 +205,7 @@ nlmsvc_proc_cancel(struct svc_rqst *rqst\n"
+ " \tresp->cookie = argp->cookie;\n"
+ " \n"
+ " \t/* Don't accept requests during grace period */\n"
+ "-\tif (nlmsvc_grace_period) {\n"
+ "+\tif (nlmsvc_grace_period || nlmsvc_fo_grace_period(argp)) {\n"
+ " \t\tresp->status = nlm_lck_denied_grace_period;\n"
+ " \t\treturn rpc_success;\n"
+ " \t}\n"
+ "@@ -222,7 +238,7 @@ nlmsvc_proc_unlock(struct svc_rqst *rqst\n"
+ " \tresp->cookie = argp->cookie;\n"
+ " \n"
+ " \t/* Don't accept new lock requests during grace period */\n"
+ "-\tif (nlmsvc_grace_period) {\n"
+ "+\tif (nlmsvc_grace_period || nlmsvc_fo_grace_period(argp)) {\n"
+ " \t\tresp->status = nlm_lck_denied_grace_period;\n"
+ " \t\treturn rpc_success;\n"
+ " \t}\n"
+ "@@ -359,7 +375,8 @@ nlmsvc_proc_share(struct svc_rqst *rqstp\n"
+ " \tresp->cookie = argp->cookie;\n"
+ " \n"
+ " \t/* Don't accept new lock requests during grace period */\n"
+ "-\tif (nlmsvc_grace_period && !argp->reclaim) {\n"
+ "+\tif ((nlmsvc_grace_period || (nlmsvc_fo_grace_period(argp))) \n"
+ "+\t\t\t&& !argp->reclaim) {\n"
+ " \t\tresp->status = nlm_lck_denied_grace_period;\n"
+ " \t\treturn rpc_success;\n"
+ " \t}\n"
+ "@@ -392,7 +409,7 @@ nlmsvc_proc_unshare(struct svc_rqst *rqs\n"
+ " \tresp->cookie = argp->cookie;\n"
+ " \n"
+ " \t/* Don't accept requests during grace period */\n"
+ "-\tif (nlmsvc_grace_period) {\n"
+ "+\tif (nlmsvc_grace_period || nlmsvc_fo_grace_period(argp)) {\n"
+ " \t\tresp->status = nlm_lck_denied_grace_period;\n"
+ " \t\treturn rpc_success;\n"
+ " \t}\n"
+ "--- linux-1/fs/lockd/svc.c\t2006-09-03 21:51:39.000000000 -0400\n"
+ "+++ linux-2/fs/lockd/svc.c\t2006-09-11 16:51:58.000000000 -0400\n"
+ "@@ -71,7 +71,7 @@ static const int\t\tnlm_port_min = 0, nlm_\n"
+ " \n"
+ " static struct ctl_table_header * nlm_sysctl_table;\n"
+ " \n"
+ "-static unsigned long set_grace_period(void)\n"
+ "+unsigned long set_grace_period(void)\n"
+ " {\n"
+ " \tunsigned long grace_period;\n"
+ " \n"
+ "@@ -81,7 +81,6 @@ static unsigned long set_grace_period(vo\n"
+ " \t\t\t\t/ nlm_timeout) * nlm_timeout * HZ;\n"
+ " \telse\n"
+ " \t\tgrace_period = nlm_timeout * 5 * HZ;\n"
+ "-\tnlmsvc_grace_period = 1;\n"
+ " \treturn grace_period + jiffies;\n"
+ " }\n"
+ " \n"
+ "@@ -129,6 +128,8 @@ lockd(struct svc_rqst *rqstp)\n"
+ " \tnlmsvc_timeout = nlm_timeout * HZ;\n"
+ " \n"
+ " \tgrace_period_expire = set_grace_period();\n"
+ "+\tnlmsvc_grace_period = 1;\n"
+ "+\t(void) nlmsvc_fo_reset_servs();\n"
+ " \n"
+ " \t/*\n"
+ " \t * The main request loop. We don't terminate until the last\n"
+ "@@ -143,6 +144,8 @@ lockd(struct svc_rqst *rqstp)\n"
+ " \t\t\tif (nlmsvc_ops) {\n"
+ " \t\t\t\tnlmsvc_invalidate_all();\n"
+ " \t\t\t\tgrace_period_expire = set_grace_period();\n"
+ "+\t\t\t\tnlmsvc_grace_period = 1;\n"
+ "+\t\t\t\t(void) nlmsvc_fo_reset_servs();\n"
+ " \t\t\t}\n"
+ " \t\t}\n"
+ " \n"
+ "@@ -189,6 +192,7 @@ lockd(struct svc_rqst *rqstp)\n"
+ " \t\t\tnlmsvc_invalidate_all();\n"
+ " \t\tnlm_shutdown_hosts();\n"
+ " \t\tnlmsvc_pid = 0;\n"
+ "+\t\t(void) nlmsvc_fo_reset_servs();\n"
+ " \t} else\n"
+ " \t\tprintk(KERN_DEBUG\n"
+ " \t\t\t\"lockd: new process, skipping host shutdown\\n\");"
+ "\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
 
-e27bd8b269a6e3fbbbc0f1047fb29dd4efc2ea7dcf805be2bdebfa5f78a00d39
+0269b4187661f0697e6ce3bcac1a66a0b3afad5c572f3b7419acfe0d6b9f61d1

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.