vmdk: fix VMFS extent parsing
PATCH 1/1 vmdk: fix VMFS extent parsing
The VMFS extent line in description file doesn't have start offset as FLAT lines does, and it should be defaulted to 0. The flat_offset variable is initialized to -1, so we need to set it in this case.
Signed-off-by Fam Zheng <[email protected]>
--- block/vmdk.c | 2 ++ 1 file changed, 2 insertions(+)
block/vmdk.c +2 -0
@@ -728,6 +728,8 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs,error_setg (errp,"Invalid extent lines: \n%s" , p);return -EINVAL ; } + }else if (!strcmp (type,"VMFS" )) { + flat_offset =0 ; }else if (ret !=4 ) {error_setg (errp,"Invalid extent lines: \n%s" , p);return -EINVAL ;
Signature · 1 line
1.8.3.1
Stefan Hajnoczi
AppliedQuoted 8 lines · Fam Zheng
The VMFS extent line in description file doesn't have start offset as FLAT lines does, and it should be defaulted to 0. The
flat_offsetvariable is initialized to -1, so we need to set it in this case.Signed-off-by Fam Zheng <[email protected]>--- block/vmdk.c | 2 ++ 1 file changed, 2 insertions(+)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan