qcow2-refcount: check_refcounts_l2(): check l2_bitmap
commit9631c7822ec60eff0701ebf151bd8b9bd5c1d5d4
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Tue, 14 Sep 2021 12:24:50 +0000 (14 15:24 +0300)
committerHanna Reitz <hreitz@redhat.com>
Wed, 15 Sep 2021 16:42:38 +0000 (15 18:42 +0200)
tree0ba3bba34a5f1283c4e4a8a063ce2d5aaf993647
parent5c3216c0460cbedd12994e584f93e0ea63a026ec
qcow2-refcount: check_refcounts_l2(): check l2_bitmap

Check subcluster bitmap of the l2 entry for different types of
clusters:

 - for compressed it must be zero
 - for allocated check consistency of two parts of the bitmap
 - for unallocated all subclusters should be unallocated
   (or zero-plain)

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Tested-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Message-Id: <20210914122454.141075-7-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
block/qcow2-refcount.c