Max Reitz 564a6b6938 qcow2: Reuse preallocated zero clusters
Instead of just freeing preallocated zero clusters and completely
allocating them from scratch, reuse them.

We cannot do this in handle_copied(), however, since this is a COW
operation. Therefore, we have to add the new logic to handle_alloc() and
simply return the existing offset if it exists. The only catch is that
we have to convince qcow2_alloc_cluster_link_l2() not to free the old
clusters (because we have reused them).

Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-05-11 12:08:24 +02:00
..
2016-01-20 13:36:23 +01:00
2017-04-28 16:02:03 +02:00
2016-10-07 14:14:06 +02:00
2016-10-07 14:14:06 +02:00
2016-11-25 13:51:30 +01:00
2017-05-11 12:08:24 +02:00
2017-04-28 16:02:02 +02:00
2016-06-07 18:19:24 +03:00
2016-01-20 13:36:23 +01:00
2016-01-20 13:36:23 +01:00
2017-04-28 16:02:02 +02:00
2016-09-23 11:42:52 +08:00
2017-04-28 16:02:02 +02:00
2017-04-28 16:02:02 +02:00
2017-04-28 16:02:02 +02:00