[Sheepdog] [PATCH 1/2] set the maximum number of replication correctly

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Fri Apr 6 19:23:47 CEST 2012


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

diff --git a/sheep/store.c b/sheep/store.c
index d98d2b4..8daefd8 100644
--- a/sheep/store.c
+++ b/sheep/store.c
@@ -210,7 +210,9 @@ static int read_copy_from_cluster(struct request *req, uint32_t epoch,
 	int fd;
 
 	e = req->entry;
-	nr = req->nr_vnodes;
+	nr = sys->nr_sobjs;
+	if (nr > req->nr_zones)
+		nr = req->nr_zones;
 
 	for (i = 0; i < nr; i++) {
 		n = obj_to_sheep(e, nr, oid, i);
-- 
1.7.8.3




More information about the sheepdog mailing list