[sheepdog] [PATCH v8 7/7] sheep: add a cluster driver for shepherd

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Tue Mar 12 01:14:44 CET 2013


> +
> +	join_reply = xzalloc(rcv.body_len);
> +	ret = xread(sph_comm_fd, join_reply, rcv.body_len);
> +	if (ret != rcv.body_len) {
> +		sd_eprintf("xread() failed: %m");
> +		exit(1);
> +	}
> +
> +	sd_iprintf("join reply arrived, nr_nodes: %d", join_reply->nr_nodes);
> +
> +	/* FIXME */

Please explain what we need to fix in future.

> +	if (join_reply->res == CJ_RES_MASTER_TRANSFER) {
> +		is_master = true;
> +
> +		nr_nodes = 1;
> +		nodes[0] = this_node;
> +	} else {
> +		memcpy(nodes, join_reply->nodes,
> +			join_reply->nr_nodes * sizeof(struct sd_node));
> +
> +		nr_nodes = join_reply->nr_nodes;
> +	}
> +



More information about the sheepdog mailing list