Skip to content

qemu-img convert: Rewrite copying logic

Kevin Wolf qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesIn review
  2. v12 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- Rebased. Commit f1d3cd79 changed many bdrv_* calls to blk_* calls. This version tries to keep those conversions and use BlockBackend where qemu.git master does or where it makes sense. Added patch 1 to get blk_write_zeroes().
- Renamed s->out_backing as s->target_has_backing [Max]
- convert_iteration_sectors(): Limit n to BDRV_REQUEST_MAX_SECTORS instead of INT_MAX [Max]
- convert_read(): Fixed sector number for image concatenation [Max]
- Fixed -S 0 for full allocation [Max, Peter]
- Leave has_zero_init = false instead of failing the conversion if bdrv_make_zero() returns an error [Max]
- Set has_zero_init = true instead of 1 [Max]
- Don't ignore error returns in a final blk_write_compressed() [Max]
- Removed TODO comment after deciding that no change is needed
- Many added tests

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3block-backend: Expose bdrv_write_zeroes()block/block-backend.c include/sysemu/block-backend.h+13 -01 reply
2/3qemu-img convert: Rewrite copying logicqemu-img.c+310 -2061 reply
3/3qemu-iotests: Some qemu-img convert teststests/qemu-iotests/122 tests/qemu-iotests/122.out tests/qemu-iotests/group+433 -02 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchMax Reitz
1/3R-b
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/3] qemu-img convert: Rewrite copying logic

See the commit message of patch 2 for the background.

v2:
- Rebased. Commit f1d3cd79 changed many bdrv_* calls to blk_* calls. This version tries to keep those conversions and use BlockBackend where qemu.git master does or where it makes sense. Added patch 1 to get blk_write_zeroes().
- Renamed s->out_backing as s->target_has_backing [Max]
- convert_iteration_sectors(): Limit n to BDRV_REQUEST_MAX_SECTORS instead of INT_MAX [Max]
- convert_read(): Fixed sector number for image concatenation [Max]
- Fixed -S 0 for full allocation [Max, Peter]
- Leave has_zero_init = false instead of failing the conversion if bdrv_make_zero() returns an error [Max]
- Set has_zero_init = true instead of 1 [Max]
- Don't ignore error returns in a final blk_write_compressed() [Max]
- Removed TODO comment after deciding that no change is needed
- Many added tests

Kevin Wolf (3):
block-backend: Expose bdrv_write_zeroes()
qemu-img convert: Rewrite copying logic
qemu-iotests: Some qemu-img convert tests

 block/block-backend.c          |  11 +
 include/sysemu/block-backend.h |   2 +
 qemu-img.c                     | 516 +++++++++++++++++++++++++----------------
 tests/qemu-iotests/122         | 223 ++++++++++++++++++
 tests/qemu-iotests/122.out     | 209 +++++++++++++++++
 tests/qemu-iotests/group       |   1 +
 6 files changed, 756 insertions(+), 206 deletions(-)
 create mode 100755 tests/qemu-iotests/122
 create mode 100644 tests/qemu-iotests/122.out
Signature · 1 line
1.8.3.1