[sheepdog] [PATCH] cluster/shepherd: fix update_node

MORITA Kazutaka morita.kazutaka at gmail.com
Wed Jul 3 08:50:55 CEST 2013


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

This fixes an obvious bug caused by 8d834be.  This also adds a comment
to explain why reweight doesn't work with the current shepherd driver.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/cluster/shepherd.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sheep/cluster/shepherd.c b/sheep/cluster/shepherd.c
index db8336e..fba329c 100644
--- a/sheep/cluster/shepherd.c
+++ b/sheep/cluster/shepherd.c
@@ -661,10 +661,11 @@ static void shepherd_unblock(void *msg, size_t msg_len)
 	do_shepherd_notify(true, msg, msg_len);
 }
 
+/* FIXME: shepherd server also has to udpate node information */
 static void shepherd_update_node(struct sd_node *node)
 {
 	struct sd_node *n = xlfind(node, nodes, nr_nodes, node_cmp);
-	*n = *nodes;
+	*n = *node;
 }
 
 static struct cluster_driver cdrv_shepherd = {
-- 
1.7.9.5




More information about the sheepdog mailing list