]> git.proxmox.com Git - mirror_qemu.git/commit
qcow2: introduce qcow2_parse_compressed_l2_entry() helper
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Tue, 14 Sep 2021 12:24:47 +0000 (15:24 +0300)
committerHanna Reitz <hreitz@redhat.com>
Wed, 15 Sep 2021 16:42:38 +0000 (18:42 +0200)
commita6e098462ba6d8585a6f21729b406ab51a70eb03
tree6fc338ee266754df846b5653bbdc66d4190820b5
parent9a3978a46bc12e0c49b7114983103b07d90cfa1c
qcow2: introduce qcow2_parse_compressed_l2_entry() helper

Add helper to parse compressed l2_entry and use it everywhere instead
of open-coding.

Note, that in most places we move to precise coffset/csize instead of
sector-aligned. Still it should work good enough for updating
refcounts.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20210914122454.141075-4-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
block/qcow2-cluster.c
block/qcow2-refcount.c
block/qcow2.c
block/qcow2.h