vmdk: Fix index_in_cluster calculation in vmdk_co_get_block_status
commit61f0ed1d54601b91b8195c1a30d7046f83283b40
authorFam Zheng <famz@redhat.com>
Thu, 4 Jun 2015 06:02:56 +0000 (4 14:02 +0800)
committerKevin Wolf <kwolf@redhat.com>
Fri, 12 Jun 2015 13:54:01 +0000 (12 15:54 +0200)
tree9fcccc20a9928bc8c6c3d6886abd4e837ab7b437
parentbc85ef265a0118d044ff62ae217c186cb08e0866
vmdk: Fix index_in_cluster calculation in vmdk_co_get_block_status

It has the similar issue with b1649fae49a8. Since the calculation
is repeated for a few times already, introduce a function so it can be
reused.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vmdk.c