qcow2: Use offset_into_cluster() and offset_to_l2_index()
commit24990c5b959c3a24d76ccf96303c1f70556f1dd2
authorAlberto Garcia <berto@igalia.com>
Tue, 20 Jun 2017 13:01:36 +0000 (20 16:01 +0300)
committerKevin Wolf <kwolf@redhat.com>
Mon, 26 Jun 2017 12:51:13 +0000 (26 14:51 +0200)
tree70e5a8a385159b0e0c82967222c2b22a44ae22d7
parentee22a9d86921310672aa8775489217f3e2f5e1c6
qcow2: Use offset_into_cluster() and offset_to_l2_index()

We already have functions for doing these calculations, so let's use
them instead of doing everything by hand. This makes the code a bit
more readable.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-cluster.c
block/qcow2.c