qcow2: Update qcow2_update_snapshot_refcount() to support L2 slices
commit83ad165be74420bc5bbf0fe4f62b6f53b1fb6004
authorAlberto Garcia <berto@igalia.com>
Mon, 5 Feb 2018 14:33:27 +0000 (5 16:33 +0200)
committerMax Reitz <mreitz@redhat.com>
Tue, 13 Feb 2018 16:00:00 +0000 (13 17:00 +0100)
tree8879f737e602c34cb217686db8ee379d5e3ddf7b
parentca62dd5c2b1897a187c841371fef88263639ce0d
qcow2: Update qcow2_update_snapshot_refcount() to support L2 slices

qcow2_update_snapshot_refcount() increases the refcount of all
clusters of a given snapshot. In order to do that it needs to load all
its L2 tables and iterate over their entries. Since we'll be loading
L2 slices instead of full tables we need to add an extra loop that
iterates over all slices of each L2 table.

This function doesn't need any additional changes so apart from that
this patch simply updates the variable name from l2_table to l2_slice.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 5f4db199b9637f4833b58487135124d70add8cf0.1517840877.git.berto@igalia.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2-refcount.c