[Sheepdog] [PATCH] collie: read entire object when listing vdi

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Wed May 12 11:29:08 CEST 2010


To calculate the number of allocated object, we need to read
the data_vdi_id field, so we must read the entire object.

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

diff --git a/collie/collie.c b/collie/collie.c
index 3251614..7b4043f 100644
--- a/collie/collie.c
+++ b/collie/collie.c
@@ -270,8 +270,7 @@ static int parse_vdi(vdi_parser_func_t func, void *data)
 			continue;
 
 		wlen = 0;
-		/* don't need to read the entire object */
-		rlen = sizeof(i) - sizeof(i.data_vdi_id);
+		rlen = sizeof(i);
 
 		memset(&hdr, 0, sizeof(hdr));
 		hdr.opcode = SD_OP_READ_OBJ;
-- 
1.5.6.5




More information about the sheepdog mailing list