qcow2: Discard preallocated zero clusters
commit293073a56c6c921c9902da17711914a0042f29ba
authorMax Reitz <mreitz@redhat.com>
Wed, 3 May 2017 23:11:19 +0000 (4 01:11 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 11 May 2017 10:08:24 +0000 (11 12:08 +0200)
treefff27922e591cee8a4a5b509c95baa48e5bccc30
parent564a6b693828ac38f3f562eed9e8b1dc62f45253
qcow2: Discard preallocated zero clusters

In discard_single_l2(), we completely discard normal clusters instead of
simply turning them into preallocated zero clusters. That means we
should probably do the same with such preallocated zero clusters:
Discard them instead of keeping them allocated.

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>
block/qcow2-cluster.c