Hi all!
v3:
01: s/l2_fixed_entries/l2_dirty/
02: add comment, s/>/>=
03: s/BDRV_SECTOR_SIZE/512
04: add Max's r-b
05: new
06-08: mostly rewritten
v2:
02, 06: check bdrv_getlength error return code
v1:
We've faced the following problem: after host fs corruption, vm images
becomes invalid. And which is interesting, starting qemu-img check on
them led to allocating of the whole RAM and then killing qemu-img by
OOM Killer.
This was due to corrupted l2 entries, which referenced clusters far-far
beyond the end of the qcow2 file.
02 is a generic fix for the bug, 01 is unrelated improvement, 03-07 are
additional info and fixing for such corrupted table entries.
Vladimir Sementsov-Ogievskiy (8):
block/qcow2-refcount: fix check_oflag_copied
block/qcow2-refcount: avoid eating RAM
block/qcow2-refcount: check_refcounts_l2: refactor compressed case
block/qcow2-refcount: check_refcounts_l2: reduce ignored overlaps
block/qcow2-refcount: check_refcounts_l2: don't count corrupted
entries
block/qcow2-refcount: refactor fixing L2 entry
block/qcow2-refcount: fix out-of-file L1 entries to be zero
block/qcow2-refcount: fix out-of-file L2 entries
block/qcow2-refcount.c | 352 ++++++++++++++++++++++++++++++-----------
1 file changed, 264 insertions(+), 88 deletions(-)
--
2.18.0