[sheepdog] [PATCH 2/2] sheep/group: allow sending SD_OP_GET_EPOCH to delayed nodes

MORITA Kazutaka morita.kazutaka at gmail.com
Tue May 14 03:17:04 CEST 2013


From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>

We cannot check whether the node is a delayed one or not in
epoch_log_read_remote() because we cannot access delayed node list in
the worker thread.  It is not a problem to send SD_OP_GET_EPOCH to
delayed nodes, so let's simply allow it.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/group.c |    9 ---------
 1 file changed, 9 deletions(-)

diff --git a/sheep/group.c b/sheep/group.c
index 630bfb8..a78dd15 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -409,11 +409,6 @@ static bool add_delayed_node(uint32_t epoch, const struct sd_node *node)
 	return true;
 }
 
-static bool is_delayed_node(const struct sd_node *node)
-{
-	return !!find_entry_list(node, main_thread_get(delayed_nodes));
-}
-
 /*
  * For a node that failed to join check if was part of the original
  * epoch, and if so add it to the list of node expected to be present
@@ -490,10 +485,6 @@ int epoch_log_read_remote(uint32_t epoch, struct sd_node *nodes, int len,
 		if (node_is_local(node))
 			continue;
 
-		/* delayed nodes don't have epoch log */
-		if (is_delayed_node(node))
-			continue;
-
 		sd_init_req(&hdr, SD_OP_GET_EPOCH);
 		hdr.data_length = len;
 		hdr.obj.tgt_epoch = epoch;
-- 
1.7.9.5




More information about the sheepdog mailing list