block: mirror - Write zeroes for unallocated sectors if no zero init
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 31 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | block: allow creation of detached dirty bitmapsblock.c block/ blockdev.c +2 more | +25 | 3 replies | |
| 2/3 | block: mirror - split out part of mirror_run()block/ | +110 | 3 replies | |
| 3/3 | block: mirror - zero unallocated target sectors when zero init not presentblock/ blockdev.c include/ +1 more | +87 | 25 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Kevin Wolf | Max Reitz |
|---|---|---|
| 1/3 | R-b | |
| 2/3 | R-b | R-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH 0/3] block: mirror - Write zeroes for unallocated sectors if no zero init
When doing a block mirror to a target that does not support zero init (e.g. host device and raw format), unallocated sectors on the source may lead to a corrupted target image.
Unallocated sectors are skipped over during block mirror (the dirty bitmap is only loaded with allocated sectors), so whatever data is already present on the target device in those sectors will likely still be there, leading the guest to read invalid data.
There are 3 patches in this series:
Patch 1 allows block device dirty bitmaps to be created but not attached (i.e. placed in the dirty_bitmaps list) to a BDS. This clears the way to having a bitmap to be used to track unallocated sectors above the 'base' image.
Patch 2 splits out the mirror code that invokes mirror_iteration(), so that we can in later patches run it multiple times using different bitmaps.
Patch 3 introduces a 2-pass mirror streaming approach, whereas the first pass writes zeroes for unallocated source sectors (if appropriate for the image type), and the second pass writes the actual source data.
Jeff Cody (3):
block: allow creation of detached dirty bitmaps
block: mirror - split out part of mirror_run()
block: mirror - zero unallocated target sectors when zero init not
present
block.c | 26 +++- block/mirror.c | 302 ++++++++++++++++++++++++++++------------------ blockdev.c | 4 +- include/block/block.h | 1 + include/block/block_int.h | 3 +- migration/block.c | 2 +- qapi/block-core.json | 6 +- 7 files changed, 214 insertions(+), 130 deletions(-)
Signature · 1 line
1.9.3