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:18 +02:00
2019-10-10 10:56:17 +02:00
2020-07-27 12:37:25 +02:00
2020-05-18 19:05:25 +02:00
2019-10-10 10:56:18 +02:00
2020-05-08 13:26:35 +02:00
2020-07-10 15:18:08 +02:00
2020-07-10 15:18:08 +02:00
2020-05-18 19:05:25 +02:00
2020-07-10 15:18:08 +02:00
2020-07-21 12:00:38 +02:00
2020-08-10 17:12:46 +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
2019-09-13 12:18:37 +02:00
2020-07-21 10:49:02 +02:00
2020-07-06 08:49:28 +02:00
2020-07-10 15:18:08 +02:00
2020-05-28 13:15:22 -05:00
2019-06-12 13:20:20 +02:00
2018-12-14 11:52:40 +01:00
2020-05-18 19:05:25 +02:00
2019-06-12 13:20:20 +02:00
2020-07-21 16:28:57 +02:00
2020-07-10 15:18:08 +02:00
2020-05-18 19:05:25 +02:00
2020-07-10 15:18:08 +02:00
2020-06-05 09:54:48 +01:00
2020-07-28 15:28:47 +02:00
2019-06-12 13:18:33 +02:00
2020-07-10 18:02:23 -04:00
2020-03-16 22:07:42 +01:00
2020-08-21 06:30:18 -04:00
2020-05-18 19:05:25 +02:00
2020-07-28 09:54:43 -05:00
2020-07-10 15:18:08 +02:00
2019-10-14 17:12:48 +02:00
2020-06-23 15:46:08 +01:00
2020-07-10 15:18:08 +02:00
2018-02-09 05:05:11 +01:00
2020-03-06 17:15:38 +01:00
2020-02-20 16:43:42 +01:00
2020-08-03 08:59:37 -05:00
2019-10-26 15:38:06 +02:00
2020-08-25 08:33:20 +02:00
2020-08-25 08:33:20 +02:00
2020-05-05 13:17:36 +02:00
2020-05-13 14:20:31 +02: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
2019-04-30 15:29:00 +02:00
2017-07-17 11:34:11 +08:00
2017-07-17 11:34:11 +08:00
2019-04-30 15:29:00 +02:00
2020-07-10 15:18:08 +02:00
2020-07-06 10:34:14 +02:00
2020-07-10 15:18:08 +02:00
2020-07-10 15:18:08 +02:00
2020-07-10 15:18:08 +02:00
2020-07-10 15:18:08 +02:00
2020-07-14 15:18:59 +02:00
2019-12-18 08:43:19 +01:00
2020-07-10 15:18:08 +02:00
2020-07-14 15:18:59 +02:00
2020-07-21 16:23:43 +02:00
2020-07-10 15:18:08 +02:00
2020-08-25 08:33:20 +02:00
2020-08-21 06:18:24 -04:00
2020-07-10 15:18:08 +02:00
2019-06-12 13:20:20 +02:00
2020-04-30 17:51:07 +02:00
2020-07-10 15:18:08 +02:00
2019-04-30 15:29:00 +02:00
2020-07-14 15:18:59 +02:00
2020-07-10 15:18:08 +02:00
2020-07-10 15:18:08 +02:00
2019-06-12 13:18:33 +02:00
2018-08-28 18:21:38 +02:00