diff for duplicates of <4799714B.9070900@redhat.com> diff --git a/a/1.txt b/N1/1.txt index 31f0ccc..61d82e1 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -2,12 +2,3 @@ Hooks are added into the existing lockd global grace period checking to enable per-ip base grace period. -- Wendy - - --------------- next part -------------- -A non-text attachment was scrubbed... -Name: resume_003.patch -Type: text/x-patch -Size: 6338 bytes -Desc: not available -URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20080125/7b5f5de0/attachment.bin> diff --git a/N1/2.hdr b/N1/2.hdr new file mode 100644 index 0000000..9980bce --- /dev/null +++ b/N1/2.hdr @@ -0,0 +1,5 @@ +Content-Type: text/x-patch; + name="resume_003.patch" +Content-Transfer-Encoding: 7bit +Content-Disposition: inline; + filename="resume_003.patch" diff --git a/N1/2.txt b/N1/2.txt new file mode 100644 index 0000000..3827af0 --- /dev/null +++ b/N1/2.txt @@ -0,0 +1,187 @@ +Hooks are added into the existing lockd global grace period checking +to enable per-ip base grace period. + +Signed-off-by: S. Wendy Cheng <wcheng@redhat.com> +Signed-off-by: Lon Hohberger <lhh@redhat.com> + + fs/lockd/svc.c | 3 ++- + fs/lockd/svc4proc.c | 13 ++++++------- + fs/lockd/svcproc.c | 12 ++++++------ + include/linux/lockd/lockd.h | 20 ++++++++++++++++++++ + 4 files changed, 34 insertions(+), 14 deletions(-) + +--- linux-3/fs/lockd/svc4proc.c 2008-01-22 12:01:33.000000000 -0500 ++++ linux-4/fs/lockd/svc4proc.c 2008-01-24 17:44:12.000000000 -0500 +@@ -18,7 +18,6 @@ + #include <linux/lockd/share.h> + #include <linux/lockd/sm_inter.h> + +- + #define NLMDBG_FACILITY NLMDBG_CLIENT + + /* +@@ -89,7 +88,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_check_grace_period(rqstp, argp)) { + resp->status = nlm_lck_denied_grace_period; + return rpc_success; + } +@@ -121,7 +120,7 @@ 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_check_grace_period(rqstp, argp) && !argp->reclaim) { + resp->status = nlm_lck_denied_grace_period; + return rpc_success; + } +@@ -166,7 +165,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_check_grace_period(rqstp, argp)) { + resp->status = nlm_lck_denied_grace_period; + return rpc_success; + } +@@ -199,7 +198,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_check_grace_period(rqstp, argp)) { + resp->status = nlm_lck_denied_grace_period; + return rpc_success; + } +@@ -336,7 +335,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_check_grace_period(rqstp, argp) && !argp->reclaim) { + resp->status = nlm_lck_denied_grace_period; + return rpc_success; + } +@@ -369,7 +368,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_check_grace_period(rqstp, argp)) { + resp->status = nlm_lck_denied_grace_period; + return rpc_success; + } +--- linux-3/fs/lockd/svcproc.c 2008-01-22 12:01:33.000000000 -0500 ++++ linux-4/fs/lockd/svcproc.c 2008-01-24 17:45:04.000000000 -0500 +@@ -118,7 +118,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_check_grace_period(rqstp, argp)) { + resp->status = nlm_lck_denied_grace_period; + return rpc_success; + } +@@ -151,7 +151,7 @@ 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_check_grace_period(rqstp, argp) && !argp->reclaim) { + resp->status = nlm_lck_denied_grace_period; + return rpc_success; + } +@@ -196,7 +196,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_check_grace_period(rqstp, argp)) { + resp->status = nlm_lck_denied_grace_period; + return rpc_success; + } +@@ -229,7 +229,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_check_grace_period(rqstp, argp)) { + resp->status = nlm_lck_denied_grace_period; + return rpc_success; + } +@@ -368,7 +368,7 @@ 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_check_grace_period(rqstp, argp) && !argp->reclaim) { + resp->status = nlm_lck_denied_grace_period; + return rpc_success; + } +@@ -401,7 +401,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_check_grace_period(rqstp, argp)) { + resp->status = nlm_lck_denied_grace_period; + return rpc_success; + } +--- linux-3/fs/lockd/svc.c 2008-01-24 17:30:55.000000000 -0500 ++++ linux-4/fs/lockd/svc.c 2008-01-24 17:41:40.000000000 -0500 +@@ -97,7 +97,7 @@ unsigned long get_nfs_grace_period(void) + } + EXPORT_SYMBOL(get_nfs_grace_period); + +-static unsigned long set_grace_period(void) ++unsigned long set_grace_period(void) + { + nlmsvc_grace_period = 1; + return get_nfs_grace_period() + jiffies; +@@ -208,6 +208,7 @@ lockd(struct svc_rqst *rqstp) + nlm_shutdown_hosts(); + nlmsvc_pid = 0; + nlmsvc_serv = NULL; ++ nlmsvc_failover_reset(); + } else + printk(KERN_DEBUG + "lockd: new process, skipping host shutdown\n"); +--- linux-3/include/linux/lockd/lockd.h 2008-01-24 17:09:26.000000000 -0500 ++++ linux-4/include/linux/lockd/lockd.h 2008-01-24 17:41:40.000000000 -0500 +@@ -222,6 +222,7 @@ int nlmsvc_failover_path(struc + int nlmsvc_failover_ip(__be32 server_addr); + int nlmsvc_failover_setgrace(void *server_ip, int ip_size); + void nlmsvc_failover_reset(void); ++int nlmsvc_failover_check(struct svc_rqst *rqstp); + + #define NLM_FO_MAX_GP_CNT 1024 + +@@ -236,6 +237,25 @@ struct nlm_failover_struct { + #define g_ip g_key.ipv6 + }; + ++extern struct list_head nlm_failover_list; ++ ++/*Check for grace period: return TRUE or FALSE */ ++static inline int ++nlmsvc_check_grace_period(struct svc_rqst *rqstp, struct nlm_args *argp) ++{ ++ /* check for system wide grace period */ ++ if (nlmsvc_grace_period) ++ return 1; ++ ++ /* check for per exported fsid grace period */ ++ if (unlikely(!list_empty(&nlm_failover_list))) ++ return(nlmsvc_failover_check(rqstp)); ++ ++ return 0; ++} ++ ++/* end of cluster failover addition */ ++ + static __inline__ struct inode * + nlmsvc_file_inode(struct nlm_file *file) + { diff --git a/a/content_digest b/N1/content_digest index 6e67e27..aad1a9c 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,21 +1,203 @@ "From\0Wendy Cheng <wcheng@redhat.com>\0" - "Subject\0[Cluster-devel] [PATCH 3/3] NLM enable per-ip base grace period\0" + "Subject\0[PATCH 3/3] NLM enable per-ip base grace period\0" "Date\0Fri, 25 Jan 2008 00:19:07 -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" "Hooks are added into the existing lockd global grace period checking to \n" "enable per-ip base grace period.\n" "\n" - "-- Wendy\n" + -- Wendy + "\01:2\0" + "fn\0resume_003.patch\0" + "b\0" + "Hooks are added into the existing lockd global grace period checking\n" + "to enable per-ip base grace period. \n" + "\n" + "Signed-off-by: S. Wendy Cheng <wcheng@redhat.com>\n" + "Signed-off-by: Lon Hohberger <lhh@redhat.com>\n" "\n" + " fs/lockd/svc.c | 3 ++-\n" + " fs/lockd/svc4proc.c | 13 ++++++-------\n" + " fs/lockd/svcproc.c | 12 ++++++------\n" + " include/linux/lockd/lockd.h | 20 ++++++++++++++++++++\n" + " 4 files changed, 34 insertions(+), 14 deletions(-)\n" "\n" - "-------------- next part --------------\n" - "A non-text attachment was scrubbed...\n" - "Name: resume_003.patch\n" - "Type: text/x-patch\n" - "Size: 6338 bytes\n" - "Desc: not available\n" - URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20080125/7b5f5de0/attachment.bin> + "--- linux-3/fs/lockd/svc4proc.c\t2008-01-22 12:01:33.000000000 -0500\n" + "+++ linux-4/fs/lockd/svc4proc.c\t2008-01-24 17:44:12.000000000 -0500\n" + "@@ -18,7 +18,6 @@\n" + " #include <linux/lockd/share.h>\n" + " #include <linux/lockd/sm_inter.h>\n" + " \n" + "-\n" + " #define NLMDBG_FACILITY\t\tNLMDBG_CLIENT\n" + " \n" + " /*\n" + "@@ -89,7 +88,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_check_grace_period(rqstp, argp)) {\n" + " \t\tresp->status = nlm_lck_denied_grace_period;\n" + " \t\treturn rpc_success;\n" + " \t}\n" + "@@ -121,7 +120,7 @@ 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_check_grace_period(rqstp, argp) && !argp->reclaim) {\n" + " \t\tresp->status = nlm_lck_denied_grace_period;\n" + " \t\treturn rpc_success;\n" + " \t}\n" + "@@ -166,7 +165,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_check_grace_period(rqstp, argp)) {\n" + " \t\tresp->status = nlm_lck_denied_grace_period;\n" + " \t\treturn rpc_success;\n" + " \t}\n" + "@@ -199,7 +198,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_check_grace_period(rqstp, argp)) {\n" + " \t\tresp->status = nlm_lck_denied_grace_period;\n" + " \t\treturn rpc_success;\n" + " \t}\n" + "@@ -336,7 +335,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_check_grace_period(rqstp, argp) && !argp->reclaim) {\n" + " \t\tresp->status = nlm_lck_denied_grace_period;\n" + " \t\treturn rpc_success;\n" + " \t}\n" + "@@ -369,7 +368,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_check_grace_period(rqstp, argp)) {\n" + " \t\tresp->status = nlm_lck_denied_grace_period;\n" + " \t\treturn rpc_success;\n" + " \t}\n" + "--- linux-3/fs/lockd/svcproc.c\t2008-01-22 12:01:33.000000000 -0500\n" + "+++ linux-4/fs/lockd/svcproc.c\t2008-01-24 17:45:04.000000000 -0500\n" + "@@ -118,7 +118,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_check_grace_period(rqstp, argp)) {\n" + " \t\tresp->status = nlm_lck_denied_grace_period;\n" + " \t\treturn rpc_success;\n" + " \t}\n" + "@@ -151,7 +151,7 @@ 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_check_grace_period(rqstp, argp) && !argp->reclaim) {\n" + " \t\tresp->status = nlm_lck_denied_grace_period;\n" + " \t\treturn rpc_success;\n" + " \t}\n" + "@@ -196,7 +196,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_check_grace_period(rqstp, argp)) {\n" + " \t\tresp->status = nlm_lck_denied_grace_period;\n" + " \t\treturn rpc_success;\n" + " \t}\n" + "@@ -229,7 +229,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_check_grace_period(rqstp, argp)) {\n" + " \t\tresp->status = nlm_lck_denied_grace_period;\n" + " \t\treturn rpc_success;\n" + " \t}\n" + "@@ -368,7 +368,7 @@ 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_check_grace_period(rqstp, argp) && !argp->reclaim) {\n" + " \t\tresp->status = nlm_lck_denied_grace_period;\n" + " \t\treturn rpc_success;\n" + " \t}\n" + "@@ -401,7 +401,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_check_grace_period(rqstp, argp)) {\n" + " \t\tresp->status = nlm_lck_denied_grace_period;\n" + " \t\treturn rpc_success;\n" + " \t}\n" + "--- linux-3/fs/lockd/svc.c\t2008-01-24 17:30:55.000000000 -0500\n" + "+++ linux-4/fs/lockd/svc.c\t2008-01-24 17:41:40.000000000 -0500\n" + "@@ -97,7 +97,7 @@ unsigned long get_nfs_grace_period(void)\n" + " }\n" + " EXPORT_SYMBOL(get_nfs_grace_period);\n" + " \n" + "-static unsigned long set_grace_period(void)\n" + "+unsigned long set_grace_period(void)\n" + " {\n" + " \tnlmsvc_grace_period = 1;\n" + " \treturn get_nfs_grace_period() + jiffies;\n" + "@@ -208,6 +208,7 @@ lockd(struct svc_rqst *rqstp)\n" + " \t\tnlm_shutdown_hosts();\n" + " \t\tnlmsvc_pid = 0;\n" + " \t\tnlmsvc_serv = NULL;\n" + "+\t\tnlmsvc_failover_reset();\n" + " \t} else\n" + " \t\tprintk(KERN_DEBUG\n" + " \t\t\t\"lockd: new process, skipping host shutdown\\n\");\n" + "--- linux-3/include/linux/lockd/lockd.h\t2008-01-24 17:09:26.000000000 -0500\n" + "+++ linux-4/include/linux/lockd/lockd.h\t2008-01-24 17:41:40.000000000 -0500\n" + "@@ -222,6 +222,7 @@ int nlmsvc_failover_path(struc\n" + " int nlmsvc_failover_ip(__be32 server_addr);\n" + " int nlmsvc_failover_setgrace(void *server_ip, int ip_size);\n" + " void nlmsvc_failover_reset(void);\n" + "+int nlmsvc_failover_check(struct svc_rqst *rqstp);\n" + " \n" + " #define NLM_FO_MAX_GP_CNT\t1024\n" + " \n" + "@@ -236,6 +237,25 @@ struct nlm_failover_struct {\n" + " #define g_ip\t\t\tg_key.ipv6\n" + " };\n" + " \n" + "+extern struct list_head nlm_failover_list;\n" + "+\n" + "+/*Check for grace period: return TRUE or FALSE */\n" + "+static inline int\n" + "+nlmsvc_check_grace_period(struct svc_rqst *rqstp, struct nlm_args *argp)\n" + "+{\n" + "+\t/* check for system wide grace period */\n" + "+\tif (nlmsvc_grace_period)\n" + "+\t\treturn 1;\n" + "+\n" + "+\t/* check for per exported fsid grace period */\n" + "+\tif (unlikely(!list_empty(&nlm_failover_list)))\n" + "+\t\treturn(nlmsvc_failover_check(rqstp));\n" + "+\n" + "+\treturn 0;\n" + "+}\n" + "+\n" + "+/* end of cluster failover addition */\n" + "+\n" + " static __inline__ struct inode *\n" + " nlmsvc_file_inode(struct nlm_file *file)\n" + { -59856c7c9551fb67aa7cee422a67192860b5129a17a42acb96aba8b0aef6387b +006bb0d6e431cf5d82456625dbc6a98cc01161a87139c676ef1375ac5f05a898
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.