Flush during bdrv_close() was introduced back in 2012 in commit
80ccf93b88 ("qemu-img: let 'qemu-img convert' flush data"). However, a
failing flush was quietly ignored. Report the error instead, since
this could mean that the image contents are not as expected. See patch
3/4 for details.

With 'qemu-img convert', when using a cache mode with 'cache.no-flush
= off', the expectation is that the data is flushed to the disk, which
happens since commit 80ccf93b88 ("qemu-img: let 'qemu-img convert'
flush data"). This expectation also encompasses that failure to do so
is properly reported, so ensure that 'qemu-img convert' exits with a
non-zero status code when the target image cannot be flushed. See
patch 4/4 for details.

qemu:

Fiona Ebner (4):
  iotests: add test cases for failing flush after qemu-img convert
  iotests.py: add filter_qemu()
  block: report flush error during bdrv_close()
  qemu-img: convert: flush target image after copying

 block.c                                    | 13 +++-
 qemu-img.c                                 |  8 ++-
 tests/qemu-iotests/026                     | 10 +--
 tests/qemu-iotests/026.out                 | 84 ++++++++++++++++++++++
 tests/qemu-iotests/071                     |  2 +-
 tests/qemu-iotests/071.out                 |  2 +
 tests/qemu-iotests/080.out                 |  2 +
 tests/qemu-iotests/098.out                 |  4 ++
 tests/qemu-iotests/122                     | 33 +++++++++
 tests/qemu-iotests/122.out                 | 17 +++++
 tests/qemu-iotests/244                     |  2 +-
 tests/qemu-iotests/244.out                 |  1 +
 tests/qemu-iotests/iotests.py              |  4 ++
 tests/qemu-iotests/tests/file-io-error     |  2 +-
 tests/qemu-iotests/tests/file-io-error.out |  2 +
 tests/qemu-iotests/tests/qsd-migrate       |  5 +-
 tests/qemu-iotests/tests/qsd-migrate.out   |  1 +
 17 files changed, 180 insertions(+), 12 deletions(-)


Summary over all repositories:
  17 files changed, 180 insertions(+), 12 deletions(-)

-- 
Generated by git-murpp 0.5.0


Reply via email to