[Sheepdog] [PATCH 1/3] sheep: pass a correct parameter to read_object()

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Sat Feb 5 14:14:36 CET 2011


The value should be the number of copies, not the number of nodes.

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

diff --git a/sheep/vdi.c b/sheep/vdi.c
index 4ad9c76..a48a8a9 100644
--- a/sheep/vdi.c
+++ b/sheep/vdi.c
@@ -429,7 +429,7 @@ again:
 	vid = ((uint32_t *)dw->buf)[done++];
 	ret = read_object(entries, nr_entries, dw->epoch,
 			  vid_to_vdi_oid(vid), (void *)&inode, sizeof(inode),
-			  0, nr_entries);
+			  0, sys->nr_sobjs);
 
 	if (ret != sizeof(inode)) {
 		eprintf("cannot find vdi object\n");
@@ -461,7 +461,7 @@ static uint64_t get_vdi_root(struct sheepdog_node_list_entry *entries,
 next:
 	ret = read_object(entries, nr_entries, epoch,
 			  vid_to_vdi_oid(vid),
-			  (void *)&inode, sizeof(inode), 0, nr_entries);
+			  (void *)&inode, sizeof(inode), 0, sys->nr_sobjs);
 
 	if (ret != sizeof(inode)) {
 		eprintf("cannot find vdi object\n");
-- 
1.5.6.5




More information about the sheepdog mailing list