crosvm/qcow
Daniel Verkamp f0fd764428 qcow: calculate refcount table size correctly
The refcount table needs to include not only the data clusters and
reftable clusters but also the L1 and L2 tables and main qcow2 header.

Also add sanity checking to prevent allocating a cluster that cannot be
indexed with the current reference count table size.

BUG=chromium:899273
TEST=cargo test -p qcow

Change-Id: I9da4515db3dccbabdeee4f60dc392b5b42d62cb2
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1308833
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2018-11-16 05:02:06 -08:00
..
src qcow: calculate refcount table size correctly 2018-11-16 05:02:06 -08:00
Cargo.toml qcow: implement WriteZeroes for QcowFile 2018-09-05 01:25:50 -07:00