Alberto Garcia 70d1cbae03 qcow2: Add qcow2_get_subcluster_range_type()
There are situations in which we want to know how many contiguous
subclusters of the same type there are in a given cluster. This can be
done by simply iterating over the subclusters and repeatedly calling
qcow2_get_subcluster_type() for each one of them.

However once we determined the type of a subcluster we can check the
rest efficiently by counting the number of adjacent ones (or zeroes)
in the bitmap. This is what this function does.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <db917263d568ec6ffb4a41cac3c9100f96bf6c18.1594396418.git.berto@igalia.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-08-25 08:33:20 +02:00
..
2020-08-21 06:30:18 -04:00
2019-10-10 10:56:17 +02:00
2020-05-18 19:05:25 +02:00
2020-05-18 19:05:25 +02:00
2020-05-18 19:05:25 +02:00
2020-05-18 19:05:25 +02:00
2020-08-21 06:30:18 -04:00
2020-06-23 15:46:08 +01:00
2018-02-09 05:05:11 +01:00
2020-08-25 08:33:20 +02:00
2020-08-25 08:33:20 +02:00
2020-07-14 15:18:59 +02:00
2020-07-06 10:34:14 +02:00
2020-07-14 15:18:59 +02:00