diff for duplicates of <44A41A3F.7050207@redhat.com> diff --git a/a/1.txt b/N1/1.txt index d7a31a3..6d35d24 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -5,10 +5,3 @@ The nlm_servs list should be short and the entries would expire within a maximum of 50 seconds. The grace period setting follows the existing NLM grace period handling without changes. Logic is triggered via echoing the ipv4 dot address into /proc/fs/nfsd/nlm_set_ip_grace file. - - - --------------- next part -------------- -An embedded and charset-unspecified text was scrubbed... -Name: gfs_nlm_ip_grace.patch -URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20060629/2fdf9f7e/attachment.ksh> diff --git a/N1/2.hdr b/N1/2.hdr new file mode 100644 index 0000000..af5e070 --- /dev/null +++ b/N1/2.hdr @@ -0,0 +1,5 @@ +Content-Type: text/plain; + name="gfs_nlm_ip_grace.patch" +Content-Transfer-Encoding: 7bit +Content-Disposition: inline; + filename="gfs_nlm_ip_grace.patch" diff --git a/N1/2.txt b/N1/2.txt new file mode 100644 index 0000000..379ce85 --- /dev/null +++ b/N1/2.txt @@ -0,0 +1,561 @@ + fs/lockd/svc.c | 8 +- + fs/lockd/svc4proc.c | 41 ++++++++++--- + fs/lockd/svcproc.c | 43 +++++++++++-- + fs/lockd/svcsubs.c | 138 ++++++++++++++++++++++++++++++++++++++++++++ + fs/nfsd/nfsctl.c | 36 +++++++++++ + include/linux/lockd/bind.h | 3 + include/linux/lockd/lockd.h | 15 ++++ + 7 files changed, 266 insertions(+), 18 deletions(-) + +--- linux-2.6.17-1/include/linux/lockd/lockd.h 2006-06-27 10:58:47.000000000 -0400 ++++ linux-2.6.17-2/include/linux/lockd/lockd.h 2006-06-27 23:38:48.000000000 -0400 +@@ -108,6 +108,13 @@ struct nlm_file { + __u32 f_iaddr; /* server ip for failover */ + }; + ++/* Server ip linked list for NLM lock failover */ ++struct nlm_serv { ++ struct nlm_serv * s_next; /* linked list */ ++ unsigned long s_grace_period; /* per ip grace period */ ++ struct in_addr s_ip; /* server ip */ ++}; ++ + /* + * This is a server block (i.e. a lock requested by some client which + * couldn't be granted because of a conflicting lock). +@@ -137,6 +144,13 @@ struct nlm_block { + #define NLM_ACT_FO_UNLOCK 3 /* failover release locks */ + + /* ++ * Floating ip failover grace period check ++ */ ++#define NLMSVC_FO_PASSTHRU 0 ++#define NLMSVC_FO_RECLAIM 1 ++#define NLMSVC_FO_BLOCK_ANY 2 ++ ++/* + * Global variables + */ + extern struct rpc_program nlm_program; +@@ -199,6 +213,7 @@ 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 *); ++int nlmsvc_fo_check(__u32); + + static __inline__ struct inode * + nlmsvc_file_inode(struct nlm_file *file) +--- linux-2.6.17-1/fs/lockd/svcsubs.c 2006-06-28 14:55:33.000000000 -0400 ++++ linux-2.6.17-2/fs/lockd/svcsubs.c 2006-06-28 14:59:53.000000000 -0400 +@@ -63,6 +63,10 @@ static inline void nlm_debug_print_file( + } + #endif + ++/* Global control structure for lock failover */ ++static DEFINE_MUTEX(nlm_ip_mutex); ++struct nlm_serv *nlm_servs=NULL; ++ + static inline unsigned int file_hash(struct nfs_fh *f) + { + unsigned int tmp=0; +@@ -380,3 +384,137 @@ nlmsvc_fo_unlock(struct in_addr *serv_ip + return (nlm_traverse_files(NULL, serv_ip, NLM_ACT_FO_UNLOCK)); + } + ++extern unsigned long set_grace_period(void); /* see fs/lockd/svc.c */ ++ ++EXPORT_SYMBOL(nlmsvc_fo_setgrace); ++ ++/* ++ * Add serv_ip into global nlm_servs list. ++ */ ++int ++nlmsvc_fo_setgrace(struct in_addr *serv_ip) ++{ ++ struct nlm_serv *per_ip, *entry; ++ ++ /* allocate the entry */ ++ per_ip = kmalloc(sizeof(struct nlm_serv), GFP_KERNEL); ++ if (per_ip == NULL) { ++ printk("lockd: nlmsvc_fo_setgrace kmalloc fails\n"); ++ return(-ENOMEM); ++ } ++ ++ dprintk("lockd: nlmsvc_fo_setgrace ip=%u.%u.%u.%u jiffies=%lu\n", ++ NIPQUAD(serv_ip->s_addr), jiffies); ++ ++ /* fill in info */ ++ per_ip->s_grace_period = set_grace_period(); ++ per_ip->s_ip = *serv_ip; ++ ++ /* link into the global list */ ++ mutex_lock(&nlm_ip_mutex); ++ ++ entry = nlm_servs; ++ if (entry) { ++ per_ip->s_next = entry; ++ nlm_servs = per_ip; ++ } else { ++ per_ip->s_next = NULL; ++ nlm_servs = per_ip; ++ } ++ ++ /* done */ ++ mutex_unlock(&nlm_ip_mutex); ++ return 0; ++} ++ ++/* nlm_servs gargabe collection ++ * - caller should hold nlm_ip_mutex ++ */ ++static inline void ++__nlm_servs_gc(struct nlm_serv *e_purge) ++{ ++ struct nlm_serv *e_next; ++ ++ while (e_purge) { ++ e_next = e_purge->s_next; ++ dprintk("lockd: nlm purge per ip (%u.%u.%u.%u) grace period at jiffies=%lu\n", ++ NIPQUAD(e_purge->s_ip.s_addr), jiffies); ++ kfree(e_purge); ++ e_purge = e_next; ++ } ++} ++ ++/* ++ * Reset global nlm_servs list ++ */ ++void ++nlmsvc_fo_reset_servs() ++{ ++ struct nlm_serv *e_purge; ++ ++ mutex_lock(&nlm_ip_mutex); ++ ++ /* nothing to do */ ++ if (!nlm_servs) { ++ mutex_unlock(&nlm_ip_mutex); ++ return; ++ } ++ ++ dprintk("lockd: nlmsvc_fo_reset nlm_servs\n"); ++ ++ /* purge the entries */ ++ e_purge = nlm_servs; ++ nlm_servs = NULL; ++ __nlm_servs_gc(e_purge); ++ ++ mutex_unlock(&nlm_ip_mutex); ++ return; ++} ++ ++/* ++ * Check whether the ip is in the failover list: nlm_servs. ++ */ ++int ++nlmsvc_fo_check(__u32 this_ip) ++{ ++ struct nlm_serv **e_top, *e_this, *e_purge=NULL; ++ int rc=0; ++ ++ dprintk("lockd: nlmsvc_fo_check (%u.%u.%u.%u)\n", NIPQUAD(this_ip)); ++ ++ mutex_lock(&nlm_ip_mutex); ++ ++ /* no failover floating ip */ ++ if (!(e_this = nlm_servs)) { ++ mutex_unlock(&nlm_ip_mutex); ++ return 0; ++ } ++ ++ /* check to see whether this_ip is in nlm_servs list */ ++ e_top = &nlm_servs; ++ while (e_this) { ++ if (time_before(e_this->s_grace_period, jiffies)) { ++ dprintk("lockd: nlmsvc %u.%u.%u.%u grace period expires\n", ++ NIPQUAD(e_this->s_ip.s_addr)); ++ e_purge = e_this; ++ break; ++ } else if (e_this->s_ip.s_addr == this_ip) { ++ dprintk("lockd: nlmsvc %u.%u.%u.%u in grace period\n", ++ NIPQUAD(e_this->s_ip.s_addr)); ++ rc = 1; ++ } ++ e_top = &(e_this->s_next); ++ e_this = e_this->s_next; ++ } ++ ++ /* piggy back nlm_servs garbage collection */ ++ if (e_purge) { ++ *e_top = NULL; ++ __nlm_servs_gc(e_purge); ++ } ++ ++ /* done */ ++ mutex_unlock(&nlm_ip_mutex); ++ return rc; ++} ++ +--- linux-2.6.17-1/include/linux/lockd/bind.h 2006-06-27 10:58:51.000000000 -0400 ++++ linux-2.6.17-2/include/linux/lockd/bind.h 2006-06-27 23:38:48.000000000 -0400 +@@ -37,5 +37,8 @@ extern void lockd_down(void); + * NLM failover + */ + extern int nlmsvc_fo_unlock(struct in_addr *); ++extern int nlmsvc_fo_setgrace(struct in_addr *); ++extern void nlmsvc_fo_reset_servs(void); ++ + + #endif /* LINUX_LOCKD_BIND_H */ +--- linux-2.6.17-1/fs/nfsd/nfsctl.c 2006-06-27 23:37:05.000000000 -0400 ++++ linux-2.6.17-2/fs/nfsd/nfsctl.c 2006-06-29 09:28:39.000000000 -0400 +@@ -57,6 +57,7 @@ enum { + NFSD_List, + NFSD_Fh, + NFSD_Nlm_unlock, ++ NFSD_Nlm_ipgrace, + NFSD_Threads, + NFSD_Versions, + /* +@@ -91,6 +92,7 @@ static ssize_t write_recoverydir(struct + * NLM lock failover + */ + static ssize_t do_nlm_fo_unlock(struct file *file, char *buf, size_t size); ++static ssize_t do_nlm_ip_grace(struct file *file, char *buf, size_t size); + + static ssize_t (*write_op[])(struct file *, char *, size_t) = { + [NFSD_Svc] = write_svc, +@@ -102,6 +104,7 @@ static ssize_t (*write_op[])(struct file + [NFSD_Getfs] = write_getfs, + [NFSD_Fh] = write_filehandle, + [NFSD_Nlm_unlock] = do_nlm_fo_unlock, ++ [NFSD_Nlm_ipgrace] = do_nlm_ip_grace, + [NFSD_Threads] = write_threads, + [NFSD_Versions] = write_versions, + #ifdef CONFIG_NFSD_V4 +@@ -360,9 +363,38 @@ int __get_nlm_host(char *buf, size_t siz + 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_ip_grace(struct file *file, char *buf, size_t size) ++{ ++ struct in_addr serv_addr; ++ int rc; ++ ++ /* convert string into valid ip address */ ++ rc = __get_nlm_host(buf, size, &serv_addr); ++ if (rc) { ++ printk("do_nlm_ip_grace: invalid ip (%s)\n", buf); ++ return rc; ++ } ++ ++ /* call nlm to set the grace period */ ++ rc = nlmsvc_fo_setgrace(&serv_addr); ++ if (rc) { ++ printk("nlmsvc_fo_setgrace return rc=%d\n", rc); ++ return rc; ++ } ++ ++ printk("nlm set per ip grace period for %u.%u.%u.%u\n", ++ NIPQUAD(serv_addr.s_addr)); ++ ++ /* done */ ++ sprintf(buf, "nlm set per ip grace period for %u.%u.%u.%u\n", ++ NIPQUAD(serv_addr.s_addr)); ++ return strlen(buf); ++} ++ + static ssize_t do_nlm_fo_unlock(struct file *file, char *buf, size_t size) + { + struct in_addr serv_addr; +@@ -382,6 +414,9 @@ static ssize_t do_nlm_fo_unlock(struct f + return rc; + } + ++ printk("nlm ip unlock released for %u.%u.%u.%u\n", ++ NIPQUAD(serv_addr.s_addr)); ++ + /* done */ + sprintf(buf, "nlm ip unlock released for %u.%u.%u.%u\n", + NIPQUAD(serv_addr.s_addr)); +@@ -537,6 +572,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_Nlm_unlock] = {"nlm_unlock", &transaction_ops, S_IWUSR|S_IRUSR}, ++ [NFSD_Nlm_ipgrace] = {"nlm_set_ip_grace", &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-2.6.17-1/fs/lockd/svc4proc.c 2006-06-27 10:56:30.000000000 -0400 ++++ linux-2.6.17-2/fs/lockd/svc4proc.c 2006-06-28 14:19:24.000000000 -0400 +@@ -21,12 +21,15 @@ + + #define NLMDBG_FACILITY NLMDBG_CLIENT + ++extern struct nlm_serv *nlm_servs; ++ + /* + * Obtain client and file from arguments + */ + static u32 + nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp, +- struct nlm_host **hostp, struct nlm_file **filp) ++ struct nlm_host **hostp, struct nlm_file **filp, ++ int passthru_check) + { + struct nlm_host *host = NULL; + struct nlm_file *file = NULL; +@@ -37,6 +40,22 @@ nlm4svc_retrieve_args(struct svc_rqst *r + if (!nlmsvc_ops) + return nlm_lck_denied_nolocks; + ++ /* Floating ip failover grace period */ ++ if (unlikely(nlm_servs)) { ++ if (nlmsvc_fo_check(rqstp->rq_daddr)) { ++ dprintk("lockd: nlm v4 fo passthru_check= %d\n", ++ passthru_check); ++ switch (passthru_check) { ++ case NLMSVC_FO_PASSTHRU: ++ break; ++ case NLMSVC_FO_RECLAIM: ++ if (argp->reclaim) break; ++ default: ++ return nlm_lck_denied_grace_period; ++ } ++ } ++ } ++ + /* Obtain host handle */ + if (!(host = nlmsvc_lookup_host(rqstp)) + || (argp->monitor && !host->h_monitored && nsm_monitor(host) < 0)) +@@ -95,7 +114,8 @@ nlm4svc_proc_test(struct svc_rqst *rqstp + } + + /* Obtain client and file */ +- if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file))) ++ if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file, ++ NLMSVC_FO_BLOCK_ANY))) + return rpc_success; + + /* Now check for conflicting locks */ +@@ -125,7 +145,8 @@ nlm4svc_proc_lock(struct svc_rqst *rqstp + } + + /* Obtain client and file */ +- if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file))) ++ if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file, ++ NLMSVC_FO_RECLAIM))) + return rpc_success; + + #if 0 +@@ -168,7 +189,8 @@ nlm4svc_proc_cancel(struct svc_rqst *rqs + } + + /* Obtain client and file */ +- if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file))) ++ if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file, ++ NLMSVC_FO_BLOCK_ANY))) + return rpc_success; + + /* Try to cancel request. */ +@@ -201,7 +223,8 @@ nlm4svc_proc_unlock(struct svc_rqst *rqs + } + + /* Obtain client and file */ +- if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file))) ++ if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file, ++ NLMSVC_FO_BLOCK_ANY))) + return rpc_success; + + /* Now try to remove the lock */ +@@ -336,7 +359,8 @@ nlm4svc_proc_share(struct svc_rqst *rqst + } + + /* Obtain client and file */ +- if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file))) ++ if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file, ++ NLMSVC_FO_RECLAIM))) + return rpc_success; + + /* Now try to create the share */ +@@ -369,7 +393,8 @@ nlm4svc_proc_unshare(struct svc_rqst *rq + } + + /* Obtain client and file */ +- if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file))) ++ if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file, ++ NLMSVC_FO_BLOCK_ANY))) + return rpc_success; + + /* Now try to lock the file */ +@@ -404,7 +429,7 @@ nlm4svc_proc_free_all(struct svc_rqst *r + struct nlm_host *host; + + /* Obtain client */ +- if (nlm4svc_retrieve_args(rqstp, argp, &host, NULL)) ++ if (nlm4svc_retrieve_args(rqstp, argp, &host, NULL, NLMSVC_FO_PASSTHRU)) + return rpc_success; + + nlmsvc_free_host_resources(host); +--- linux-2.6.17-1/fs/lockd/svcproc.c 2006-06-27 10:56:30.000000000 -0400 ++++ linux-2.6.17-2/fs/lockd/svcproc.c 2006-06-28 14:19:50.000000000 -0400 +@@ -50,12 +50,15 @@ cast_to_nlm(u32 status, u32 vers) + #define cast_status(status) (status) + #endif + ++extern struct nlm_serv *nlm_servs; ++ + /* + * Obtain client and file from arguments + */ + static u32 + nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp, +- struct nlm_host **hostp, struct nlm_file **filp) ++ struct nlm_host **hostp, struct nlm_file **filp, ++ int passthru_check) + { + struct nlm_host *host = NULL; + struct nlm_file *file = NULL; +@@ -66,6 +69,24 @@ nlmsvc_retrieve_args(struct svc_rqst *rq + if (!nlmsvc_ops) + return nlm_lck_denied_nolocks; + ++ /* Floating ip failover grace period */ ++ if (unlikely(nlm_servs)) { ++ if (nlmsvc_fo_check(rqstp->rq_daddr)) { ++ ++ dprintk("lockd: nlm fo passthru_check = %d\n", ++ passthru_check); ++ ++ switch (passthru_check) { ++ case NLMSVC_FO_PASSTHRU: ++ break; ++ case NLMSVC_FO_RECLAIM: ++ if (argp->reclaim) break; ++ default: ++ return nlm_lck_denied_grace_period; ++ } ++ } ++ } ++ + /* Obtain host handle */ + if (!(host = nlmsvc_lookup_host(rqstp)) + || (argp->monitor && !host->h_monitored && nsm_monitor(host) < 0)) +@@ -122,7 +143,8 @@ nlmsvc_proc_test(struct svc_rqst *rqstp, + } + + /* Obtain client and file */ +- if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file))) ++ if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file, ++ NLMSVC_FO_BLOCK_ANY))) + return rpc_success; + + /* Now check for conflicting locks */ +@@ -153,7 +175,8 @@ nlmsvc_proc_lock(struct svc_rqst *rqstp, + } + + /* Obtain client and file */ +- if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file))) ++ if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file, ++ NLMSVC_FO_RECLAIM))) + return rpc_success; + + #if 0 +@@ -196,7 +219,8 @@ nlmsvc_proc_cancel(struct svc_rqst *rqst + } + + /* Obtain client and file */ +- if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file))) ++ if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file, ++ NLMSVC_FO_BLOCK_ANY))) + return rpc_success; + + /* Try to cancel request. */ +@@ -229,7 +253,8 @@ nlmsvc_proc_unlock(struct svc_rqst *rqst + } + + /* Obtain client and file */ +- if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file))) ++ if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file, ++ NLMSVC_FO_BLOCK_ANY))) + return rpc_success; + + /* Now try to remove the lock */ +@@ -366,7 +391,8 @@ nlmsvc_proc_share(struct svc_rqst *rqstp + } + + /* Obtain client and file */ +- if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file))) ++ if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file, ++ NLMSVC_FO_RECLAIM))) + return rpc_success; + + /* Now try to create the share */ +@@ -399,7 +425,8 @@ nlmsvc_proc_unshare(struct svc_rqst *rqs + } + + /* Obtain client and file */ +- if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file))) ++ if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file, ++ NLMSVC_FO_BLOCK_ANY))) + return rpc_success; + + /* Now try to unshare the file */ +@@ -434,7 +461,7 @@ nlmsvc_proc_free_all(struct svc_rqst *rq + struct nlm_host *host; + + /* Obtain client */ +- if (nlmsvc_retrieve_args(rqstp, argp, &host, NULL)) ++ if (nlmsvc_retrieve_args(rqstp, argp, &host, NULL, NLMSVC_FO_PASSTHRU)) + return rpc_success; + + nlmsvc_free_host_resources(host); +--- linux-2.6.17-1/fs/lockd/svc.c 2006-06-27 10:56:30.000000000 -0400 ++++ linux-2.6.17-2/fs/lockd/svc.c 2006-06-27 23:38:48.000000000 -0400 +@@ -72,7 +72,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; + +@@ -82,7 +82,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; + } + +@@ -130,6 +129,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 +@@ -144,6 +145,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(); + } + } + +@@ -190,6 +193,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..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 6f280ec..eb8cb25 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 2/3] NLM lock failover - per ip grace period\0" + "Subject\0[RFC PATCH 2/3] NLM lock failover - per ip grace period\0" "Date\0Thu, 29 Jun 2006 14:21: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" "This patch enables per ip NLM lock grace period. The implementation is \n" "based on a global single linked list nlm_servs that contains entries of \n" @@ -10,13 +12,581 @@ "The nlm_servs list should be short and the entries would expire within a \n" "maximum of 50 seconds. The grace period setting follows the existing \n" "NLM grace period handling without changes. Logic is triggered via \n" - "echoing the ipv4 dot address into /proc/fs/nfsd/nlm_set_ip_grace file.\n" - "\n" - "\n" + echoing the ipv4 dot address into /proc/fs/nfsd/nlm_set_ip_grace file. + "\01:2\0" + "fn\0gfs_nlm_ip_grace.patch\0" + "b\0" + " fs/lockd/svc.c | 8 +-\n" + " fs/lockd/svc4proc.c | 41 ++++++++++---\n" + " fs/lockd/svcproc.c | 43 +++++++++++--\n" + " fs/lockd/svcsubs.c | 138 ++++++++++++++++++++++++++++++++++++++++++++\n" + " fs/nfsd/nfsctl.c | 36 +++++++++++\n" + " include/linux/lockd/bind.h | 3 \n" + " include/linux/lockd/lockd.h | 15 ++++\n" + " 7 files changed, 266 insertions(+), 18 deletions(-)\n" "\n" - "-------------- next part --------------\n" - "An embedded and charset-unspecified text was scrubbed...\n" - "Name: gfs_nlm_ip_grace.patch\n" - URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20060629/2fdf9f7e/attachment.ksh> + "--- linux-2.6.17-1/include/linux/lockd/lockd.h\t2006-06-27 10:58:47.000000000 -0400\n" + "+++ linux-2.6.17-2/include/linux/lockd/lockd.h\t2006-06-27 23:38:48.000000000 -0400\n" + "@@ -108,6 +108,13 @@ struct nlm_file {\n" + " \t__u32\t\t\tf_iaddr;\t/* server ip for failover */\n" + " };\n" + " \n" + "+/* Server ip linked list for NLM lock failover */\n" + "+struct nlm_serv {\n" + "+\tstruct nlm_serv *\ts_next;\t\t/* linked list */\n" + "+\tunsigned long\t\ts_grace_period;\t/* per ip grace period */\n" + "+\tstruct in_addr\t\ts_ip;\t\t/* server ip */\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" + "@@ -137,6 +144,13 @@ struct nlm_block {\n" + " #define NLM_ACT_FO_UNLOCK\t3\t\t/* failover release locks */\n" + " \n" + " /*\n" + "+ * Floating ip failover grace period check\n" + "+ */\n" + "+#define NLMSVC_FO_PASSTHRU\t0\n" + "+#define NLMSVC_FO_RECLAIM\t1\n" + "+#define NLMSVC_FO_BLOCK_ANY\t2\n" + "+\n" + "+/*\n" + " * Global variables\n" + " */\n" + " extern struct rpc_program\tnlm_program;\n" + "@@ -199,6 +213,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(struct in_addr *);\n" + "+int \t\t nlmsvc_fo_check(__u32);\n" + " \n" + " static __inline__ struct inode *\n" + " nlmsvc_file_inode(struct nlm_file *file)\n" + "--- linux-2.6.17-1/fs/lockd/svcsubs.c\t2006-06-28 14:55:33.000000000 -0400\n" + "+++ linux-2.6.17-2/fs/lockd/svcsubs.c\t2006-06-28 14:59:53.000000000 -0400\n" + "@@ -63,6 +63,10 @@ static inline void nlm_debug_print_file(\n" + " }\n" + " #endif\n" + " \n" + "+/* Global control structure for lock failover */\n" + "+static DEFINE_MUTEX(nlm_ip_mutex);\n" + "+struct nlm_serv *nlm_servs=NULL;\n" + "+\n" + " static inline unsigned int file_hash(struct nfs_fh *f)\n" + " {\n" + " \tunsigned int tmp=0;\n" + "@@ -380,3 +384,137 @@ nlmsvc_fo_unlock(struct in_addr *serv_ip\n" + " \treturn (nlm_traverse_files(NULL, serv_ip, NLM_ACT_FO_UNLOCK)); \n" + " }\n" + " \n" + "+extern unsigned long set_grace_period(void); /* see fs/lockd/svc.c */\n" + "+\n" + "+EXPORT_SYMBOL(nlmsvc_fo_setgrace);\n" + "+\n" + "+/*\n" + "+ * Add serv_ip into global nlm_servs list.\n" + "+ */\n" + "+int\n" + "+nlmsvc_fo_setgrace(struct in_addr *serv_ip)\n" + "+{\n" + "+\tstruct nlm_serv *per_ip, *entry;\n" + "+\n" + "+\t/* allocate the entry */\n" + "+\tper_ip = kmalloc(sizeof(struct nlm_serv), GFP_KERNEL);\n" + "+\tif (per_ip == NULL) {\n" + "+\t\tprintk(\"lockd: nlmsvc_fo_setgrace kmalloc fails\\n\");\n" + "+\t\treturn(-ENOMEM);\n" + "+\t}\n" + "+\n" + "+\tdprintk(\"lockd: nlmsvc_fo_setgrace ip=%u.%u.%u.%u jiffies=%lu\\n\",\n" + "+\t\tNIPQUAD(serv_ip->s_addr), jiffies);\n" + "+\n" + "+\t/* fill in info */\n" + "+\tper_ip->s_grace_period = set_grace_period();\n" + "+\tper_ip->s_ip = *serv_ip;\n" + "+\n" + "+\t/* link into the global list */\n" + "+\tmutex_lock(&nlm_ip_mutex);\n" + "+\n" + "+\tentry = nlm_servs;\n" + "+\tif (entry) {\n" + "+\t\tper_ip->s_next = entry;\n" + "+\t\tnlm_servs = per_ip;\n" + "+\t} else {\n" + "+\t\tper_ip->s_next = NULL;\n" + "+\t\tnlm_servs = per_ip;\n" + "+\t}\n" + "+\n" + "+\t/* done */\n" + "+\tmutex_unlock(&nlm_ip_mutex);\n" + "+\treturn 0;\n" + "+}\n" + "+\n" + "+/* nlm_servs gargabe collection \n" + "+ * - caller should hold nlm_ip_mutex\n" + "+ */\n" + "+static inline void\n" + "+__nlm_servs_gc(struct nlm_serv *e_purge)\n" + "+{\n" + "+\tstruct nlm_serv *e_next;\n" + "+\n" + "+\twhile (e_purge) {\n" + "+\t\te_next = e_purge->s_next;\n" + "+\t\tdprintk(\"lockd: nlm purge per ip (%u.%u.%u.%u) grace period at jiffies=%lu\\n\",\n" + "+\t\t\tNIPQUAD(e_purge->s_ip.s_addr), jiffies);\n" + "+\t\tkfree(e_purge);\n" + "+\t\te_purge = e_next;\n" + "+\t}\n" + "+}\n" + "+\n" + "+/* \n" + "+ * Reset global nlm_servs list \n" + "+ */\n" + "+void \n" + "+nlmsvc_fo_reset_servs()\n" + "+{\n" + "+\tstruct nlm_serv *e_purge;\n" + "+\n" + "+\tmutex_lock(&nlm_ip_mutex);\n" + "+\n" + "+\t/* nothing to do */\n" + "+\tif (!nlm_servs) {\n" + "+\t\tmutex_unlock(&nlm_ip_mutex);\n" + "+\t\treturn;\n" + "+\t}\n" + "+\n" + "+\tdprintk(\"lockd: nlmsvc_fo_reset nlm_servs\\n\");\n" + "+\n" + "+\t/* purge the entries */\n" + "+\te_purge = nlm_servs;\n" + "+\tnlm_servs = NULL;\n" + "+\t__nlm_servs_gc(e_purge);\n" + "+\n" + "+\tmutex_unlock(&nlm_ip_mutex);\n" + "+\treturn;\n" + "+}\n" + "+\n" + "+/*\n" + "+ * Check whether the ip is in the failover list: nlm_servs.\n" + "+ */\n" + "+int\n" + "+nlmsvc_fo_check(__u32 this_ip)\n" + "+{\n" + "+\tstruct nlm_serv **e_top, *e_this, *e_purge=NULL;\n" + "+\tint rc=0;\n" + "+\n" + "+\tdprintk(\"lockd: nlmsvc_fo_check (%u.%u.%u.%u)\\n\", NIPQUAD(this_ip));\n" + "+\n" + "+\tmutex_lock(&nlm_ip_mutex);\n" + "+\n" + "+\t/* no failover floating ip */\n" + "+\tif (!(e_this = nlm_servs)) {\n" + "+\t\tmutex_unlock(&nlm_ip_mutex);\n" + "+\t\treturn 0;\n" + "+\t}\n" + "+\n" + "+\t/* check to see whether this_ip is in nlm_servs list */\n" + "+\te_top = &nlm_servs;\n" + "+\twhile (e_this) {\n" + "+\t\tif (time_before(e_this->s_grace_period, jiffies)) {\n" + "+\t\t\tdprintk(\"lockd: nlmsvc %u.%u.%u.%u grace period expires\\n\",\n" + "+\t\t\t\tNIPQUAD(e_this->s_ip.s_addr));\n" + "+\t\t\te_purge = e_this;\n" + "+\t\t\tbreak;\n" + "+\t\t} else if (e_this->s_ip.s_addr == this_ip) {\n" + "+\t\t\tdprintk(\"lockd: nlmsvc %u.%u.%u.%u in grace period\\n\",\n" + "+\t\t\t\tNIPQUAD(e_this->s_ip.s_addr));\n" + "+\t\t\trc = 1;\n" + "+\t\t}\n" + "+\t\te_top = &(e_this->s_next);\n" + "+\t\te_this = e_this->s_next;\n" + "+\t}\n" + "+\n" + "+\t/* piggy back nlm_servs garbage collection */\n" + "+\tif (e_purge) {\n" + "+\t\t*e_top = NULL;\n" + "+\t\t__nlm_servs_gc(e_purge);\n" + "+\t}\n" + "+\n" + "+\t/* done */\n" + "+\tmutex_unlock(&nlm_ip_mutex);\n" + "+\treturn rc;\n" + "+}\n" + "+\n" + "--- linux-2.6.17-1/include/linux/lockd/bind.h\t2006-06-27 10:58:51.000000000 -0400\n" + "+++ linux-2.6.17-2/include/linux/lockd/bind.h\t2006-06-27 23:38:48.000000000 -0400\n" + "@@ -37,5 +37,8 @@ extern void\tlockd_down(void);\n" + " * NLM failover\n" + " */\n" + " extern int nlmsvc_fo_unlock(struct in_addr *);\n" + "+extern int nlmsvc_fo_setgrace(struct in_addr *);\n" + "+extern void nlmsvc_fo_reset_servs(void);\n" + "+\n" + " \n" + " #endif /* LINUX_LOCKD_BIND_H */\n" + "--- linux-2.6.17-1/fs/nfsd/nfsctl.c\t2006-06-27 23:37:05.000000000 -0400\n" + "+++ linux-2.6.17-2/fs/nfsd/nfsctl.c\t2006-06-29 09:28:39.000000000 -0400\n" + "@@ -57,6 +57,7 @@ enum {\n" + " \tNFSD_List,\n" + " \tNFSD_Fh,\n" + " \tNFSD_Nlm_unlock,\n" + "+\tNFSD_Nlm_ipgrace,\n" + " \tNFSD_Threads,\n" + " \tNFSD_Versions,\n" + " \t/*\n" + "@@ -91,6 +92,7 @@ static ssize_t write_recoverydir(struct \n" + " * NLM lock failover\n" + " */\n" + " static ssize_t do_nlm_fo_unlock(struct file *file, char *buf, size_t size);\n" + "+static ssize_t do_nlm_ip_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" + "@@ -102,6 +104,7 @@ static ssize_t (*write_op[])(struct file\n" + " \t[NFSD_Getfs] = write_getfs,\n" + " \t[NFSD_Fh] = write_filehandle,\n" + " \t[NFSD_Nlm_unlock] = do_nlm_fo_unlock,\n" + "+\t[NFSD_Nlm_ipgrace] = do_nlm_ip_grace,\n" + " \t[NFSD_Threads] = write_threads,\n" + " \t[NFSD_Versions] = write_versions,\n" + " #ifdef CONFIG_NFSD_V4\n" + "@@ -360,9 +363,38 @@ int __get_nlm_host(char *buf, size_t siz\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" + "+\n" + " \treturn 0;\n" + " }\n" + " \n" + "+static ssize_t do_nlm_ip_grace(struct file *file, char *buf, size_t size)\n" + "+{\n" + "+\tstruct in_addr serv_addr;\n" + "+\tint rc;\n" + "+\n" + "+\t/* convert string into valid ip address */\n" + "+\trc = __get_nlm_host(buf, size, &serv_addr);\n" + "+\tif (rc) {\n" + "+\t\tprintk(\"do_nlm_ip_grace: invalid ip (%s)\\n\", buf);\n" + "+\t\treturn rc;\n" + "+\t}\n" + "+\n" + "+\t/* call nlm to set the grace period */\n" + "+\trc = nlmsvc_fo_setgrace(&serv_addr);\n" + "+\tif (rc) {\n" + "+\t\tprintk(\"nlmsvc_fo_setgrace return rc=%d\\n\", rc);\n" + "+\t\treturn rc;\n" + "+\t}\n" + "+\n" + "+\tprintk(\"nlm set per ip grace period for %u.%u.%u.%u\\n\",\n" + "+\t\tNIPQUAD(serv_addr.s_addr));\n" + "+\n" + "+\t/* done */\n" + "+\tsprintf(buf, \"nlm set per ip grace period for %u.%u.%u.%u\\n\",\n" + "+\t\tNIPQUAD(serv_addr.s_addr));\n" + "+\treturn strlen(buf);\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" + "@@ -382,6 +414,9 @@ static ssize_t do_nlm_fo_unlock(struct f\n" + " \t\treturn rc;\n" + " \t}\n" + " \n" + "+\tprintk(\"nlm ip unlock released for %u.%u.%u.%u\\n\",\n" + "+\t\tNIPQUAD(serv_addr.s_addr));\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" + "@@ -537,6 +572,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_Nlm_unlock] = {\"nlm_unlock\", &transaction_ops, S_IWUSR|S_IRUSR},\n" + "+\t\t[NFSD_Nlm_ipgrace] = {\"nlm_set_ip_grace\", &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-2.6.17-1/fs/lockd/svc4proc.c\t2006-06-27 10:56:30.000000000 -0400\n" + "+++ linux-2.6.17-2/fs/lockd/svc4proc.c\t2006-06-28 14:19:24.000000000 -0400\n" + "@@ -21,12 +21,15 @@\n" + " \n" + " #define NLMDBG_FACILITY\t\tNLMDBG_CLIENT\n" + " \n" + "+extern struct nlm_serv *nlm_servs;\n" + "+\n" + " /*\n" + " * Obtain client and file from arguments\n" + " */\n" + " static u32\n" + " nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,\n" + "-\t\t\tstruct nlm_host **hostp, struct nlm_file **filp)\n" + "+\t\t\tstruct nlm_host **hostp, struct nlm_file **filp,\n" + "+\t\t\tint passthru_check)\n" + " {\n" + " \tstruct nlm_host\t\t*host = NULL;\n" + " \tstruct nlm_file\t\t*file = NULL;\n" + "@@ -37,6 +40,22 @@ nlm4svc_retrieve_args(struct svc_rqst *r\n" + " \tif (!nlmsvc_ops)\n" + " \t\treturn nlm_lck_denied_nolocks;\n" + " \n" + "+\t/* Floating ip failover grace period */\n" + "+\tif (unlikely(nlm_servs)) {\n" + "+\t\tif (nlmsvc_fo_check(rqstp->rq_daddr)) {\n" + "+\t\t\tdprintk(\"lockd: nlm v4 fo passthru_check= %d\\n\", \n" + "+\t\t\t\tpassthru_check);\n" + "+\t\t\tswitch (passthru_check) {\n" + "+\t\t\t\tcase NLMSVC_FO_PASSTHRU:\n" + "+\t\t\t\t\tbreak;\n" + "+\t\t\t\tcase NLMSVC_FO_RECLAIM:\n" + "+\t\t\t\t\tif (argp->reclaim) break;\n" + "+\t\t\t\tdefault:\n" + "+\t\t\t\t\treturn nlm_lck_denied_grace_period;\n" + "+\t\t\t}\n" + "+\t\t}\n" + "+\t}\n" + "+\n" + " \t/* Obtain host handle */\n" + " \tif (!(host = nlmsvc_lookup_host(rqstp))\n" + " \t || (argp->monitor && !host->h_monitored && nsm_monitor(host) < 0))\n" + "@@ -95,7 +114,8 @@ nlm4svc_proc_test(struct svc_rqst *rqstp\n" + " \t}\n" + " \n" + " \t/* Obtain client and file */\n" + "-\tif ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))\n" + "+\tif ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file,\n" + "+\t\t\tNLMSVC_FO_BLOCK_ANY)))\n" + " \t\treturn rpc_success;\n" + " \n" + " \t/* Now check for conflicting locks */\n" + "@@ -125,7 +145,8 @@ nlm4svc_proc_lock(struct svc_rqst *rqstp\n" + " \t}\n" + " \n" + " \t/* Obtain client and file */\n" + "-\tif ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))\n" + "+\tif ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file,\n" + "+\t\tNLMSVC_FO_RECLAIM)))\n" + " \t\treturn rpc_success;\n" + " \n" + " #if 0\n" + "@@ -168,7 +189,8 @@ nlm4svc_proc_cancel(struct svc_rqst *rqs\n" + " \t}\n" + " \n" + " \t/* Obtain client and file */\n" + "-\tif ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))\n" + "+\tif ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file,\n" + "+\t\t\tNLMSVC_FO_BLOCK_ANY)))\n" + " \t\treturn rpc_success;\n" + " \n" + " \t/* Try to cancel request. */\n" + "@@ -201,7 +223,8 @@ nlm4svc_proc_unlock(struct svc_rqst *rqs\n" + " \t}\n" + " \n" + " \t/* Obtain client and file */\n" + "-\tif ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))\n" + "+\tif ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file,\n" + "+\t\t\tNLMSVC_FO_BLOCK_ANY)))\n" + " \t\treturn rpc_success;\n" + " \n" + " \t/* Now try to remove the lock */\n" + "@@ -336,7 +359,8 @@ nlm4svc_proc_share(struct svc_rqst *rqst\n" + " \t}\n" + " \n" + " \t/* Obtain client and file */\n" + "-\tif ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))\n" + "+\tif ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file,\n" + "+\t\t\tNLMSVC_FO_RECLAIM)))\n" + " \t\treturn rpc_success;\n" + " \n" + " \t/* Now try to create the share */\n" + "@@ -369,7 +393,8 @@ nlm4svc_proc_unshare(struct svc_rqst *rq\n" + " \t}\n" + " \n" + " \t/* Obtain client and file */\n" + "-\tif ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))\n" + "+\tif ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file,\n" + "+\t\t\tNLMSVC_FO_BLOCK_ANY)))\n" + " \t\treturn rpc_success;\n" + " \n" + " \t/* Now try to lock the file */\n" + "@@ -404,7 +429,7 @@ nlm4svc_proc_free_all(struct svc_rqst *r\n" + " \tstruct nlm_host\t*host;\n" + " \n" + " \t/* Obtain client */\n" + "-\tif (nlm4svc_retrieve_args(rqstp, argp, &host, NULL))\n" + "+\tif (nlm4svc_retrieve_args(rqstp, argp, &host, NULL, NLMSVC_FO_PASSTHRU))\n" + " \t\treturn rpc_success;\n" + " \n" + " \tnlmsvc_free_host_resources(host);\n" + "--- linux-2.6.17-1/fs/lockd/svcproc.c\t2006-06-27 10:56:30.000000000 -0400\n" + "+++ linux-2.6.17-2/fs/lockd/svcproc.c\t2006-06-28 14:19:50.000000000 -0400\n" + "@@ -50,12 +50,15 @@ cast_to_nlm(u32 status, u32 vers)\n" + " #define cast_status(status) (status)\n" + " #endif\n" + " \n" + "+extern struct nlm_serv *nlm_servs;\n" + "+\n" + " /*\n" + " * Obtain client and file from arguments\n" + " */\n" + " static u32\n" + " nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,\n" + "-\t\t\tstruct nlm_host **hostp, struct nlm_file **filp)\n" + "+\t\t\tstruct nlm_host **hostp, struct nlm_file **filp,\n" + "+\t\t\tint passthru_check)\n" + " {\n" + " \tstruct nlm_host\t\t*host = NULL;\n" + " \tstruct nlm_file\t\t*file = NULL;\n" + "@@ -66,6 +69,24 @@ nlmsvc_retrieve_args(struct svc_rqst *rq\n" + " \tif (!nlmsvc_ops)\n" + " \t\treturn nlm_lck_denied_nolocks;\n" + " \n" + "+\t/* Floating ip failover grace period */\n" + "+\tif (unlikely(nlm_servs)) {\n" + "+\t\tif (nlmsvc_fo_check(rqstp->rq_daddr)) {\n" + "+\n" + "+\t\t\tdprintk(\"lockd: nlm fo passthru_check = %d\\n\", \n" + "+\t\t\t\tpassthru_check);\n" + "+\n" + "+\t\t\tswitch (passthru_check) {\n" + "+\t\t\t\tcase NLMSVC_FO_PASSTHRU:\n" + "+\t\t\t\t\tbreak;\n" + "+\t\t\t\tcase NLMSVC_FO_RECLAIM:\n" + "+\t\t\t\t\tif (argp->reclaim) break;\n" + "+\t\t\t\tdefault:\n" + "+\t\t\t\t\treturn nlm_lck_denied_grace_period;\n" + "+\t\t\t}\n" + "+\t\t}\n" + "+\t}\n" + "+\n" + " \t/* Obtain host handle */\n" + " \tif (!(host = nlmsvc_lookup_host(rqstp))\n" + " \t || (argp->monitor && !host->h_monitored && nsm_monitor(host) < 0))\n" + "@@ -122,7 +143,8 @@ nlmsvc_proc_test(struct svc_rqst *rqstp,\n" + " \t}\n" + " \n" + " \t/* Obtain client and file */\n" + "-\tif ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))\n" + "+\tif ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file,\n" + "+\t\t\tNLMSVC_FO_BLOCK_ANY)))\n" + " \t\treturn rpc_success;\n" + " \n" + " \t/* Now check for conflicting locks */\n" + "@@ -153,7 +175,8 @@ nlmsvc_proc_lock(struct svc_rqst *rqstp,\n" + " \t}\n" + " \n" + " \t/* Obtain client and file */\n" + "-\tif ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))\n" + "+\tif ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file,\n" + "+\t\t\tNLMSVC_FO_RECLAIM)))\n" + " \t\treturn rpc_success;\n" + " \n" + " #if 0\n" + "@@ -196,7 +219,8 @@ nlmsvc_proc_cancel(struct svc_rqst *rqst\n" + " \t}\n" + " \n" + " \t/* Obtain client and file */\n" + "-\tif ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))\n" + "+\tif ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file,\n" + "+\t\t\tNLMSVC_FO_BLOCK_ANY)))\n" + " \t\treturn rpc_success;\n" + " \n" + " \t/* Try to cancel request. */\n" + "@@ -229,7 +253,8 @@ nlmsvc_proc_unlock(struct svc_rqst *rqst\n" + " \t}\n" + " \n" + " \t/* Obtain client and file */\n" + "-\tif ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))\n" + "+\tif ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file,\n" + "+\t\t\tNLMSVC_FO_BLOCK_ANY)))\n" + " \t\treturn rpc_success;\n" + " \n" + " \t/* Now try to remove the lock */\n" + "@@ -366,7 +391,8 @@ nlmsvc_proc_share(struct svc_rqst *rqstp\n" + " \t}\n" + " \n" + " \t/* Obtain client and file */\n" + "-\tif ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))\n" + "+\tif ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file,\n" + "+\t\t\tNLMSVC_FO_RECLAIM)))\n" + " \t\treturn rpc_success;\n" + " \n" + " \t/* Now try to create the share */\n" + "@@ -399,7 +425,8 @@ nlmsvc_proc_unshare(struct svc_rqst *rqs\n" + " \t}\n" + " \n" + " \t/* Obtain client and file */\n" + "-\tif ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))\n" + "+\tif ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file,\n" + "+\t\t\tNLMSVC_FO_BLOCK_ANY)))\n" + " \t\treturn rpc_success;\n" + " \n" + " \t/* Now try to unshare the file */\n" + "@@ -434,7 +461,7 @@ nlmsvc_proc_free_all(struct svc_rqst *rq\n" + " \tstruct nlm_host\t*host;\n" + " \n" + " \t/* Obtain client */\n" + "-\tif (nlmsvc_retrieve_args(rqstp, argp, &host, NULL))\n" + "+\tif (nlmsvc_retrieve_args(rqstp, argp, &host, NULL, NLMSVC_FO_PASSTHRU))\n" + " \t\treturn rpc_success;\n" + " \n" + " \tnlmsvc_free_host_resources(host);\n" + "--- linux-2.6.17-1/fs/lockd/svc.c\t2006-06-27 10:56:30.000000000 -0400\n" + "+++ linux-2.6.17-2/fs/lockd/svc.c\t2006-06-27 23:38:48.000000000 -0400\n" + "@@ -72,7 +72,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" + "@@ -82,7 +82,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" + "@@ -130,6 +129,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" + "@@ -144,6 +145,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" + "@@ -190,6 +193,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" + "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 -8ee982933ad92ad5f1d10e7c467a52870b36da9ab7f22c9584422de565cbc11f +61c6ab56af8738863747725993c86586343632bf467a198ea283d1c8cb275c59
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.