[sheepdog] [PATCH] dog: fix 'vdi object map' for hyper volume

Liu Yuan namei.unix at gmail.com
Wed Feb 19 07:28:40 CET 2014


max_vdi is overflowed

Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 dog/vdi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dog/vdi.c b/dog/vdi.c
index e4346f2..0b2d21b 100644
--- a/dog/vdi.c
+++ b/dog/vdi.c
@@ -888,7 +888,7 @@ static int vdi_object_map(int argc, char **argv)
 		vid = INODE_GET_VID(inode, idx);
 		printf("%08"PRIu64" %8"PRIx32"\n", idx, vid);
 	} else {
-		uint32_t max_idx = count_data_objs(inode);
+		uint64_t max_idx = count_data_objs(inode);
 
 		for (idx = 0; idx < max_idx; idx++) {
 			vid = INODE_GET_VID(inode, idx);
-- 
1.8.1.2




More information about the sheepdog mailing list