diff for duplicates of <20111222155131.GA21453@ca-server1.us.oracle.com> diff --git a/a/1.txt b/N1/1.txt index 8b13789..d1b741d 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1 +1,282 @@ +>From 40459298b15abe8b47b7a62b54f65693d9991df4 Mon Sep 17 00:00:00 2001 +From: Dan Magenheimer <dan.magenheimer@oracle.com> +Date: Wed, 21 Dec 2011 14:01:57 -0700 +Subject: [PATCH V2 3/6] drivers/staging/ramster: ramster-specific changes to cluster code +Ramster-specific changes to ocfs2 cluster foundation, including: +A method for fooling the o2 heartbeat into starting without +an ocfs2 filesystem; a new message mechanism ("data magic") for handling +a reply to a message requesting data; a hack for keeping the cluster +alive even after timeouts so cluster machines can be rebooted separately. + +Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> + +--- + + drivers/staging/ramster/cluster/Makefile | 3 +- + drivers/staging/ramster/cluster/heartbeat.c | 8 ++ + drivers/staging/ramster/cluster/heartbeat.h | 3 + + drivers/staging/ramster/cluster/tcp.c | 112 ++++++++++++++++++++++++ + drivers/staging/ramster/cluster/tcp.h | 4 + + drivers/staging/ramster/cluster/tcp_internal.h | 7 ++ + 6 files changed, 136 insertions(+), 1 deletions(-) + +diff --git a/drivers/staging/ramster/cluster/Makefile b/drivers/staging/ramster/cluster/Makefile +index bc8c5e7..3fc8550 100644 +--- a/drivers/staging/ramster/cluster/Makefile ++++ b/drivers/staging/ramster/cluster/Makefile +@@ -1,4 +1,5 @@ +-obj-$(CONFIG_OCFS2_FS) += ocfs2_nodemanager.o ++#obj-$(CONFIG_OCFS2_FS) += ocfs2_nodemanager.o ++obj-$(CONFIG_RAMSTER) += ocfs2_nodemanager.o + + ocfs2_nodemanager-objs := heartbeat.o masklog.o sys.o nodemanager.o \ + quorum.o tcp.o netdebug.o ver.o +diff --git a/drivers/staging/ramster/cluster/heartbeat.c b/drivers/staging/ramster/cluster/heartbeat.c +index 9a3e6bb..8ac11e5 100644 +--- a/drivers/staging/ramster/cluster/heartbeat.c ++++ b/drivers/staging/ramster/cluster/heartbeat.c +@@ -2626,3 +2626,11 @@ int o2hb_global_heartbeat_active(void) + return (o2hb_heartbeat_mode == O2HB_HEARTBEAT_GLOBAL); + } + EXPORT_SYMBOL(o2hb_global_heartbeat_active); ++ ++#ifdef CONFIG_RAMSTER ++void o2hb_manual_set_node_heartbeating(int node_num) ++{ ++ if (node_num < O2NM_MAX_NODES) ++ set_bit(node_num, o2hb_live_node_bitmap); ++} ++#endif +diff --git a/drivers/staging/ramster/cluster/heartbeat.h b/drivers/staging/ramster/cluster/heartbeat.h +index 00ad8e8..cf1a164 100644 +--- a/drivers/staging/ramster/cluster/heartbeat.h ++++ b/drivers/staging/ramster/cluster/heartbeat.h +@@ -85,5 +85,8 @@ int o2hb_check_local_node_heartbeating(void); + void o2hb_stop_all_regions(void); + int o2hb_get_all_regions(char *region_uuids, u8 numregions); + int o2hb_global_heartbeat_active(void); ++#ifdef CONFIG_RAMSTER ++void o2hb_manual_set_node_heartbeating(int); ++#endif + + #endif /* O2CLUSTER_HEARTBEAT_H */ +diff --git a/drivers/staging/ramster/cluster/tcp.c b/drivers/staging/ramster/cluster/tcp.c +index db5ee4b..39d9750 100644 +--- a/drivers/staging/ramster/cluster/tcp.c ++++ b/drivers/staging/ramster/cluster/tcp.c +@@ -287,7 +287,11 @@ static inline int o2net_sys_err_to_errno(enum o2net_system_error err) + return trans; + } + ++#ifdef CONFIG_RAMSTER ++struct o2net_node *o2net_nn_from_num(u8 node_num) ++#else + static struct o2net_node * o2net_nn_from_num(u8 node_num) ++#endif + { + BUG_ON(node_num >= ARRAY_SIZE(o2net_nodes)); + return &o2net_nodes[node_num]; +@@ -1048,6 +1052,11 @@ int o2net_send_message_vec(u32 msg_type, u32 key, struct kvec *caller_vec, + }; + struct o2net_send_tracking nst; + ++#ifdef CONFIG_RAMSTER ++ /* this may be a general bug fix */ ++ init_waitqueue_head(&nsw.ns_wq); ++#endif ++ + o2net_init_nst(&nst, msg_type, key, current, target_node); + + if (o2net_wq == NULL) { +@@ -1188,6 +1197,52 @@ static int o2net_send_status_magic(struct socket *sock, struct o2net_msg *hdr, + return o2net_send_tcp_msg(sock, &vec, 1, sizeof(struct o2net_msg)); + } + ++#ifdef CONFIG_RAMSTER ++/* ++ * "data magic" is a long version of "status magic" where the message ++ * payload actually contains data to be passed in reply to certain messages ++ */ ++static int o2net_send_data_magic(struct o2net_sock_container *sc, ++ struct o2net_msg *hdr, ++ void *data, size_t data_len, ++ enum o2net_system_error syserr, int err) ++{ ++ struct kvec vec[2]; ++ int ret; ++ ++ vec[0].iov_base = hdr; ++ vec[0].iov_len = sizeof(struct o2net_msg); ++ vec[1].iov_base = data; ++ vec[1].iov_len = data_len; ++ ++ BUG_ON(syserr >= O2NET_ERR_MAX); ++ ++ /* leave other fields intact from the incoming message, msg_num ++ * in particular */ ++ hdr->sys_status = cpu_to_be32(syserr); ++ hdr->status = cpu_to_be32(err); ++ hdr->magic = cpu_to_be16(O2NET_MSG_DATA_MAGIC); /* twiddle magic */ ++ hdr->data_len = cpu_to_be16(data_len); ++ ++ msglog(hdr, "about to send data magic %d\n", err); ++ /* hdr has been in host byteorder this whole time */ ++ ret = o2net_send_tcp_msg(sc->sc_sock, vec, 2, ++ sizeof(struct o2net_msg) + data_len); ++ return ret; ++} ++ ++/* ++ * called by a message handler to convert an otherwise normal reply ++ * message into a "data magic" message ++ */ ++void o2net_force_data_magic(struct o2net_msg *hdr, u16 msgtype, u32 msgkey) ++{ ++ hdr->magic = cpu_to_be16(O2NET_MSG_DATA_MAGIC); ++ hdr->msg_type = cpu_to_be16(msgtype); ++ hdr->key = cpu_to_be32(msgkey); ++} ++#endif ++ + /* this returns -errno if the header was unknown or too large, etc. + * after this is called the buffer us reused for the next message */ + static int o2net_process_message(struct o2net_sock_container *sc, +@@ -1198,6 +1253,9 @@ static int o2net_process_message(struct o2net_sock_container *sc, + enum o2net_system_error syserr; + struct o2net_msg_handler *nmh = NULL; + void *ret_data = NULL; ++#ifdef CONFIG_RAMSTER ++ int data_magic = 0; ++#endif + + msglog(hdr, "processing message\n"); + +@@ -1219,6 +1277,16 @@ static int o2net_process_message(struct o2net_sock_container *sc, + goto out; + case O2NET_MSG_MAGIC: + break; ++#ifdef CONFIG_RAMSTER ++ case O2NET_MSG_DATA_MAGIC: ++ /* ++ * unlike a normal status magic, a data magic DOES ++ * (MUST) have a handler, so the control flow is ++ * a little funky here as a result ++ */ ++ data_magic = 1; ++ break; ++#endif + default: + msglog(hdr, "bad magic\n"); + ret = -EINVAL; +@@ -1251,6 +1319,34 @@ static int o2net_process_message(struct o2net_sock_container *sc, + handler_status = (nmh->nh_func)(hdr, sizeof(struct o2net_msg) + + be16_to_cpu(hdr->data_len), + nmh->nh_func_data, &ret_data); ++#ifdef CONFIG_RAMSTER ++ if (data_magic) { ++ /* ++ * handler handled data sent in reply to request ++ * so complete the transaction ++ */ ++ o2net_complete_nsw(nn, NULL, be32_to_cpu(hdr->msg_num), ++ be32_to_cpu(hdr->sys_status), handler_status); ++ goto out; ++ } ++ /* ++ * handler changed magic to DATA_MAGIC to reply to request for data, ++ * implies ret_data points to data to return and handler_status ++ * is the number of bytes of data ++ */ ++ if (be16_to_cpu(hdr->magic) == O2NET_MSG_DATA_MAGIC) { ++ ret = o2net_send_data_magic(sc, hdr, ++ ret_data, handler_status, ++ syserr, 0); ++ hdr = NULL; ++ mlog(0, "sending data reply %d, syserr %d returned %d\n", ++ handler_status, syserr, ret); ++ o2net_set_func_stop_time(sc); ++ ++ o2net_update_recv_stats(sc); ++ goto out; ++ } ++#endif + o2net_set_func_stop_time(sc); + + o2net_update_recv_stats(sc); +@@ -1538,7 +1634,9 @@ static void o2net_sc_send_keep_req(struct work_struct *work) + static void o2net_idle_timer(unsigned long data) + { + struct o2net_sock_container *sc = (struct o2net_sock_container *)data; ++#ifndef CONFIG_RAMSTER + struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num); ++#endif + + #ifdef CONFIG_DEBUG_FS + ktime_t now = ktime_get(); +@@ -1566,9 +1664,14 @@ static void o2net_idle_timer(unsigned long data) + * Initialize the nn_timeout so that the next connection attempt + * will continue in o2net_start_connect. + */ ++#ifdef CONFIG_RAMSTER ++ /* Avoid spurious shutdowns... not sure if this is still necessary */ ++ pr_err("o2net_idle_timer, skipping shutdown work\n"); ++#else + atomic_set(&nn->nn_timeout, 1); + + o2net_sc_queue_work(sc, &sc->sc_shutdown_work); ++#endif + } + + static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc) +@@ -2087,6 +2190,15 @@ void o2net_stop_listening(struct o2nm_node *node) + o2quo_conn_err(node->nd_num); + } + ++#ifdef CONFIG_RAMSTER ++void o2net_hb_node_up_manual(int node_num) ++{ ++ struct o2nm_node dummy; ++ o2hb_manual_set_node_heartbeating(node_num); ++ o2net_hb_node_up_cb(&dummy, node_num, NULL); ++} ++#endif ++ + /* ------------------------------------------------------------ */ + + int o2net_init(void) +diff --git a/drivers/staging/ramster/cluster/tcp.h b/drivers/staging/ramster/cluster/tcp.h +index fd6179e..afac35a 100644 +--- a/drivers/staging/ramster/cluster/tcp.h ++++ b/drivers/staging/ramster/cluster/tcp.h +@@ -105,6 +105,10 @@ int o2net_register_handler(u32 msg_type, u32 key, u32 max_len, + o2net_post_msg_handler_func *post_func, + struct list_head *unreg_list); + void o2net_unregister_handler_list(struct list_head *list); ++#ifdef CONFIG_RAMSTER ++void o2net_force_data_magic(struct o2net_msg *, u16, u32); ++void o2net_hb_node_up_manual(int node_num); ++#endif + + struct o2nm_node; + int o2net_register_hb_callbacks(void); +diff --git a/drivers/staging/ramster/cluster/tcp_internal.h b/drivers/staging/ramster/cluster/tcp_internal.h +index 4cbcb65..ce17135 100644 +--- a/drivers/staging/ramster/cluster/tcp_internal.h ++++ b/drivers/staging/ramster/cluster/tcp_internal.h +@@ -26,6 +26,13 @@ + #define O2NET_MSG_STATUS_MAGIC ((u16)0xfa56) + #define O2NET_MSG_KEEP_REQ_MAGIC ((u16)0xfa57) + #define O2NET_MSG_KEEP_RESP_MAGIC ((u16)0xfa58) ++#ifdef CONFIG_RAMSTER ++/* ++ * "data magic" is a long version of "status magic" where the message ++ * payload actually contains data to be passed in reply to certain messages ++ */ ++#define O2NET_MSG_DATA_MAGIC ((u16)0xfa59) ++#endif + + /* we're delaying our quorum decision so that heartbeat will have timed + * out truly dead nodes by the time we come around to making decisions +-- +1.7.1 diff --git a/a/content_digest b/N1/content_digest index ef6605a..6bb4566 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -13,5 +13,287 @@ " dan.magenheimer@oracle.com\0" "\00:1\0" "b\0" + ">From 40459298b15abe8b47b7a62b54f65693d9991df4 Mon Sep 17 00:00:00 2001\n" + "From: Dan Magenheimer <dan.magenheimer@oracle.com>\n" + "Date: Wed, 21 Dec 2011 14:01:57 -0700\n" + "Subject: [PATCH V2 3/6] drivers/staging/ramster: ramster-specific changes to cluster code\n" + "\n" + "Ramster-specific changes to ocfs2 cluster foundation, including:\n" + "A method for fooling the o2 heartbeat into starting without\n" + "an ocfs2 filesystem; a new message mechanism (\"data magic\") for handling\n" + "a reply to a message requesting data; a hack for keeping the cluster\n" + "alive even after timeouts so cluster machines can be rebooted separately.\n" + "\n" + "Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>\n" + "\n" + "---\n" + "\n" + " drivers/staging/ramster/cluster/Makefile | 3 +-\n" + " drivers/staging/ramster/cluster/heartbeat.c | 8 ++\n" + " drivers/staging/ramster/cluster/heartbeat.h | 3 +\n" + " drivers/staging/ramster/cluster/tcp.c | 112 ++++++++++++++++++++++++\n" + " drivers/staging/ramster/cluster/tcp.h | 4 +\n" + " drivers/staging/ramster/cluster/tcp_internal.h | 7 ++\n" + " 6 files changed, 136 insertions(+), 1 deletions(-)\n" + "\n" + "diff --git a/drivers/staging/ramster/cluster/Makefile b/drivers/staging/ramster/cluster/Makefile\n" + "index bc8c5e7..3fc8550 100644\n" + "--- a/drivers/staging/ramster/cluster/Makefile\n" + "+++ b/drivers/staging/ramster/cluster/Makefile\n" + "@@ -1,4 +1,5 @@\n" + "-obj-$(CONFIG_OCFS2_FS) += ocfs2_nodemanager.o\n" + "+#obj-$(CONFIG_OCFS2_FS) += ocfs2_nodemanager.o\n" + "+obj-$(CONFIG_RAMSTER) += ocfs2_nodemanager.o\n" + " \n" + " ocfs2_nodemanager-objs := heartbeat.o masklog.o sys.o nodemanager.o \\\n" + " \tquorum.o tcp.o netdebug.o ver.o\n" + "diff --git a/drivers/staging/ramster/cluster/heartbeat.c b/drivers/staging/ramster/cluster/heartbeat.c\n" + "index 9a3e6bb..8ac11e5 100644\n" + "--- a/drivers/staging/ramster/cluster/heartbeat.c\n" + "+++ b/drivers/staging/ramster/cluster/heartbeat.c\n" + "@@ -2626,3 +2626,11 @@ int o2hb_global_heartbeat_active(void)\n" + " \treturn (o2hb_heartbeat_mode == O2HB_HEARTBEAT_GLOBAL);\n" + " }\n" + " EXPORT_SYMBOL(o2hb_global_heartbeat_active);\n" + "+\n" + "+#ifdef CONFIG_RAMSTER\n" + "+void o2hb_manual_set_node_heartbeating(int node_num)\n" + "+{\n" + "+\tif (node_num < O2NM_MAX_NODES)\n" + "+\t\tset_bit(node_num, o2hb_live_node_bitmap);\n" + "+}\n" + "+#endif\n" + "diff --git a/drivers/staging/ramster/cluster/heartbeat.h b/drivers/staging/ramster/cluster/heartbeat.h\n" + "index 00ad8e8..cf1a164 100644\n" + "--- a/drivers/staging/ramster/cluster/heartbeat.h\n" + "+++ b/drivers/staging/ramster/cluster/heartbeat.h\n" + "@@ -85,5 +85,8 @@ int o2hb_check_local_node_heartbeating(void);\n" + " void o2hb_stop_all_regions(void);\n" + " int o2hb_get_all_regions(char *region_uuids, u8 numregions);\n" + " int o2hb_global_heartbeat_active(void);\n" + "+#ifdef CONFIG_RAMSTER\n" + "+void o2hb_manual_set_node_heartbeating(int);\n" + "+#endif\n" + " \n" + " #endif /* O2CLUSTER_HEARTBEAT_H */\n" + "diff --git a/drivers/staging/ramster/cluster/tcp.c b/drivers/staging/ramster/cluster/tcp.c\n" + "index db5ee4b..39d9750 100644\n" + "--- a/drivers/staging/ramster/cluster/tcp.c\n" + "+++ b/drivers/staging/ramster/cluster/tcp.c\n" + "@@ -287,7 +287,11 @@ static inline int o2net_sys_err_to_errno(enum o2net_system_error err)\n" + " \treturn trans;\n" + " }\n" + " \n" + "+#ifdef CONFIG_RAMSTER\n" + "+struct o2net_node *o2net_nn_from_num(u8 node_num)\n" + "+#else\n" + " static struct o2net_node * o2net_nn_from_num(u8 node_num)\n" + "+#endif\n" + " {\n" + " \tBUG_ON(node_num >= ARRAY_SIZE(o2net_nodes));\n" + " \treturn &o2net_nodes[node_num];\n" + "@@ -1048,6 +1052,11 @@ int o2net_send_message_vec(u32 msg_type, u32 key, struct kvec *caller_vec,\n" + " \t};\n" + " \tstruct o2net_send_tracking nst;\n" + " \n" + "+#ifdef CONFIG_RAMSTER\n" + "+\t/* this may be a general bug fix */\n" + "+\tinit_waitqueue_head(&nsw.ns_wq);\n" + "+#endif\n" + "+\n" + " \to2net_init_nst(&nst, msg_type, key, current, target_node);\n" + " \n" + " \tif (o2net_wq == NULL) {\n" + "@@ -1188,6 +1197,52 @@ static int o2net_send_status_magic(struct socket *sock, struct o2net_msg *hdr,\n" + " \treturn o2net_send_tcp_msg(sock, &vec, 1, sizeof(struct o2net_msg));\n" + " }\n" + " \n" + "+#ifdef CONFIG_RAMSTER\n" + "+/*\n" + "+ * \"data magic\" is a long version of \"status magic\" where the message\n" + "+ * payload actually contains data to be passed in reply to certain messages\n" + "+ */\n" + "+static int o2net_send_data_magic(struct o2net_sock_container *sc,\n" + "+\t\t\t struct o2net_msg *hdr,\n" + "+\t\t\t void *data, size_t data_len,\n" + "+\t\t\t enum o2net_system_error syserr, int err)\n" + "+{\n" + "+\tstruct kvec vec[2];\n" + "+\tint ret;\n" + "+\n" + "+\tvec[0].iov_base = hdr;\n" + "+\tvec[0].iov_len = sizeof(struct o2net_msg);\n" + "+\tvec[1].iov_base = data;\n" + "+\tvec[1].iov_len = data_len;\n" + "+\n" + "+\tBUG_ON(syserr >= O2NET_ERR_MAX);\n" + "+\n" + "+\t/* leave other fields intact from the incoming message, msg_num\n" + "+\t * in particular */\n" + "+\thdr->sys_status = cpu_to_be32(syserr);\n" + "+\thdr->status = cpu_to_be32(err);\n" + "+\thdr->magic = cpu_to_be16(O2NET_MSG_DATA_MAGIC); /* twiddle magic */\n" + "+\thdr->data_len = cpu_to_be16(data_len);\n" + "+\n" + "+\tmsglog(hdr, \"about to send data magic %d\\n\", err);\n" + "+\t/* hdr has been in host byteorder this whole time */\n" + "+\tret = o2net_send_tcp_msg(sc->sc_sock, vec, 2,\n" + "+\t\t\tsizeof(struct o2net_msg) + data_len);\n" + "+\treturn ret;\n" + "+}\n" + "+\n" + "+/*\n" + "+ * called by a message handler to convert an otherwise normal reply\n" + "+ * message into a \"data magic\" message\n" + "+ */\n" + "+void o2net_force_data_magic(struct o2net_msg *hdr, u16 msgtype, u32 msgkey)\n" + "+{\n" + "+\thdr->magic = cpu_to_be16(O2NET_MSG_DATA_MAGIC);\n" + "+\thdr->msg_type = cpu_to_be16(msgtype);\n" + "+\thdr->key = cpu_to_be32(msgkey);\n" + "+}\n" + "+#endif\n" + "+\n" + " /* this returns -errno if the header was unknown or too large, etc.\n" + " * after this is called the buffer us reused for the next message */\n" + " static int o2net_process_message(struct o2net_sock_container *sc,\n" + "@@ -1198,6 +1253,9 @@ static int o2net_process_message(struct o2net_sock_container *sc,\n" + " \tenum o2net_system_error syserr;\n" + " \tstruct o2net_msg_handler *nmh = NULL;\n" + " \tvoid *ret_data = NULL;\n" + "+#ifdef CONFIG_RAMSTER\n" + "+\tint data_magic = 0;\n" + "+#endif\n" + " \n" + " \tmsglog(hdr, \"processing message\\n\");\n" + " \n" + "@@ -1219,6 +1277,16 @@ static int o2net_process_message(struct o2net_sock_container *sc,\n" + " \t\t\tgoto out;\n" + " \t\tcase O2NET_MSG_MAGIC:\n" + " \t\t\tbreak;\n" + "+#ifdef CONFIG_RAMSTER\n" + "+\t\tcase O2NET_MSG_DATA_MAGIC:\n" + "+\t\t\t/*\n" + "+\t\t\t * unlike a normal status magic, a data magic DOES\n" + "+\t\t\t * (MUST) have a handler, so the control flow is\n" + "+\t\t\t * a little funky here as a result\n" + "+\t\t\t */\n" + "+\t\t\tdata_magic = 1;\n" + "+\t\t\tbreak;\n" + "+#endif\n" + " \t\tdefault:\n" + " \t\t\tmsglog(hdr, \"bad magic\\n\");\n" + " \t\t\tret = -EINVAL;\n" + "@@ -1251,6 +1319,34 @@ static int o2net_process_message(struct o2net_sock_container *sc,\n" + " \thandler_status = (nmh->nh_func)(hdr, sizeof(struct o2net_msg) +\n" + " \t\t\t\t\t be16_to_cpu(hdr->data_len),\n" + " \t\t\t\t\tnmh->nh_func_data, &ret_data);\n" + "+#ifdef CONFIG_RAMSTER\n" + "+\tif (data_magic) {\n" + "+\t\t/*\n" + "+\t\t * handler handled data sent in reply to request\n" + "+\t\t * so complete the transaction\n" + "+\t\t */\n" + "+\t\to2net_complete_nsw(nn, NULL, be32_to_cpu(hdr->msg_num),\n" + "+\t\t\tbe32_to_cpu(hdr->sys_status), handler_status);\n" + "+\t\tgoto out;\n" + "+\t}\n" + "+\t/*\n" + "+\t * handler changed magic to DATA_MAGIC to reply to request for data,\n" + "+\t * implies ret_data points to data to return and handler_status\n" + "+\t * is the number of bytes of data\n" + "+\t */\n" + "+\tif (be16_to_cpu(hdr->magic) == O2NET_MSG_DATA_MAGIC) {\n" + "+\t\tret = o2net_send_data_magic(sc, hdr,\n" + "+\t\t\t\t\t\tret_data, handler_status,\n" + "+\t\t\t\t\t\tsyserr, 0);\n" + "+\t\thdr = NULL;\n" + "+\t\tmlog(0, \"sending data reply %d, syserr %d returned %d\\n\",\n" + "+\t\t\thandler_status, syserr, ret);\n" + "+\t\to2net_set_func_stop_time(sc);\n" + "+\n" + "+\t\to2net_update_recv_stats(sc);\n" + "+\t\tgoto out;\n" + "+\t}\n" + "+#endif\n" + " \to2net_set_func_stop_time(sc);\n" + " \n" + " \to2net_update_recv_stats(sc);\n" + "@@ -1538,7 +1634,9 @@ static void o2net_sc_send_keep_req(struct work_struct *work)\n" + " static void o2net_idle_timer(unsigned long data)\n" + " {\n" + " \tstruct o2net_sock_container *sc = (struct o2net_sock_container *)data;\n" + "+#ifndef CONFIG_RAMSTER\n" + " \tstruct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num);\n" + "+#endif\n" + " \n" + " #ifdef CONFIG_DEBUG_FS\n" + " \tktime_t now = ktime_get();\n" + "@@ -1566,9 +1664,14 @@ static void o2net_idle_timer(unsigned long data)\n" + " \t * Initialize the nn_timeout so that the next connection attempt\n" + " \t * will continue in o2net_start_connect.\n" + " \t */\n" + "+#ifdef CONFIG_RAMSTER\n" + "+\t/* Avoid spurious shutdowns... not sure if this is still necessary */\n" + "+\tpr_err(\"o2net_idle_timer, skipping shutdown work\\n\");\n" + "+#else\n" + " \tatomic_set(&nn->nn_timeout, 1);\n" + " \n" + " \to2net_sc_queue_work(sc, &sc->sc_shutdown_work);\n" + "+#endif\n" + " }\n" + " \n" + " static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc)\n" + "@@ -2087,6 +2190,15 @@ void o2net_stop_listening(struct o2nm_node *node)\n" + " \to2quo_conn_err(node->nd_num);\n" + " }\n" + " \n" + "+#ifdef CONFIG_RAMSTER\n" + "+void o2net_hb_node_up_manual(int node_num)\n" + "+{\n" + "+\tstruct o2nm_node dummy;\n" + "+\to2hb_manual_set_node_heartbeating(node_num);\n" + "+\to2net_hb_node_up_cb(&dummy, node_num, NULL);\n" + "+}\n" + "+#endif\n" + "+\n" + " /* ------------------------------------------------------------ */\n" + " \n" + " int o2net_init(void)\n" + "diff --git a/drivers/staging/ramster/cluster/tcp.h b/drivers/staging/ramster/cluster/tcp.h\n" + "index fd6179e..afac35a 100644\n" + "--- a/drivers/staging/ramster/cluster/tcp.h\n" + "+++ b/drivers/staging/ramster/cluster/tcp.h\n" + "@@ -105,6 +105,10 @@ int o2net_register_handler(u32 msg_type, u32 key, u32 max_len,\n" + " \t\t\t o2net_post_msg_handler_func *post_func,\n" + " \t\t\t struct list_head *unreg_list);\n" + " void o2net_unregister_handler_list(struct list_head *list);\n" + "+#ifdef CONFIG_RAMSTER\n" + "+void o2net_force_data_magic(struct o2net_msg *, u16, u32);\n" + "+void o2net_hb_node_up_manual(int node_num);\n" + "+#endif\n" + " \n" + " struct o2nm_node;\n" + " int o2net_register_hb_callbacks(void);\n" + "diff --git a/drivers/staging/ramster/cluster/tcp_internal.h b/drivers/staging/ramster/cluster/tcp_internal.h\n" + "index 4cbcb65..ce17135 100644\n" + "--- a/drivers/staging/ramster/cluster/tcp_internal.h\n" + "+++ b/drivers/staging/ramster/cluster/tcp_internal.h\n" + "@@ -26,6 +26,13 @@\n" + " #define O2NET_MSG_STATUS_MAGIC ((u16)0xfa56)\n" + " #define O2NET_MSG_KEEP_REQ_MAGIC ((u16)0xfa57)\n" + " #define O2NET_MSG_KEEP_RESP_MAGIC ((u16)0xfa58)\n" + "+#ifdef CONFIG_RAMSTER\n" + "+/*\n" + "+ * \"data magic\" is a long version of \"status magic\" where the message\n" + "+ * payload actually contains data to be passed in reply to certain messages\n" + "+ */\n" + "+#define O2NET_MSG_DATA_MAGIC ((u16)0xfa59)\n" + "+#endif\n" + " \n" + " /* we're delaying our quorum decision so that heartbeat will have timed\n" + " * out truly dead nodes by the time we come around to making decisions\n" + "-- \n" + 1.7.1 -7b004abc109ea2bf5eb1f1c4e800cd1ff6e5a0895263977891b9525d3e3472ce +dff3056dcc8fab5cacd78412a2197b09c01b0206664f12df3974d988e43a1433
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.