[Sheepdog] [PATCH] sheep: fix counting of requested logs

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Sat Sep 17 09:40:17 CEST 2011


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

diff --git a/sheep/group.c b/sheep/group.c
index ee12cf3..89e14db 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -266,7 +266,7 @@ void cluster_queue_request(struct work *work, int idx)
 			      (struct sd_node_rsp *)rsp, req->data);
 		break;
 	case SD_OP_STAT_CLUSTER:
-		max_logs = rsp->data_length / sizeof(log->nodes[0]);
+		max_logs = hdr->data_length / sizeof(*log);
 		epoch = get_latest_epoch();
 		rsp->data_length = 0;
 		for (i = 0; i < max_logs; i++) {
-- 
1.7.2.5




More information about the sheepdog mailing list