[sheepdog] [PATCH] recovery: fix a bug of get_vnode_info_epoch() which gives a bad node number
levin li
levin108 at gmail.com
Sun Jun 24 10:32:23 CEST 2012
From: levin li <xingke.lwp at taobao.com>
When local epoch file does not exist, sheep tries to read from remote node
by epoch_log_read_remote(), which directly returns the number of node, not
the length of node data.
Signed-off-by: levin li <xingke.lwp at taobao.com>
---
sheep/group.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sheep/group.c b/sheep/group.c
index 6721025..b448809 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -236,7 +236,6 @@ struct vnode_info *get_vnode_info_epoch(uint32_t epoch)
nr_nodes = epoch_log_read_remote(epoch, nodes, sizeof(nodes));
if (nr_nodes == 0)
return NULL;
- nr_nodes /= sizeof(nodes[0]);
}
return alloc_vnode_info(nodes, nr_nodes);
--
1.7.10
More information about the sheepdog
mailing list