qcow2: Update discard_single_l2() to support L2 slices
commit21ab3add9c9564270a64c92fff448b3333b6d328
authorAlberto Garcia <berto@igalia.com>
Mon, 5 Feb 2018 14:33:24 +0000 (5 16:33 +0200)
committerMax Reitz <mreitz@redhat.com>
Tue, 13 Feb 2018 16:00:00 +0000 (13 17:00 +0100)
tree72822ef48214e024b63fa7c317a9728f1170bea8
parent6d99a344473b2c5e2906489e3587b952d9b84a83
qcow2: Update discard_single_l2() to support L2 slices

discard_single_l2() limits the number of clusters to be discarded
to the amount that fits inside an L2 table. Since we'll be loading
L2 slices instead of full tables we need to update that limit. The
function is renamed to discard_in_l2_slice() for clarity.

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

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