Skip to content

fix image fleecing

Vladimir Sementsov-Ogievskiy qemu-devel 5 versions – Applied

Status from this message: Thanks, applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 5 repliesApplied
  2. v44 patches 6 repliesSuperseded
  3. v34 patches 8 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v24 patches0 repliesSuperseded
v12 patches10 repliesSuperseded

v4 from the cover letter

01: fix copy_range architecture here too
02: rebase on 01
03: rebase

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/4block/io: fix copy_rangeblock/io.c include/block/block.h+38 -151 reply
2/4block: split flags in copy_rangeblock/backup.c block/block-backend.c block/file-posix.c +8 more+90 -591 reply
3/4block: add BDRV_REQ_SERIALISING flagblock/io.c include/block/block.h+37 -21 reply
4/4block/backup: fix fleecing scheme: use serialized writesblock/backup.c+14 -61 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchFam Zheng
1/4R-b
2/4R-b
3/4R-b
4/4R-b

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

Read the v5 thread

Cover letter [Qemu-devel] [PATCH v5 0/4] fix image fleecing

Hi all.

This fixes image fleecing scheme for 3.0, details are in 04 patch. 01 is a significant fix too.

v5: - keep one _internal recursive function like in original code [Fam]
- grammar and rewording [Eric] (a bit changed,
be free to fix/reword in flight)

PS: 222 now fails for me, no matter with or without these series...

v4:
01: fix copy_range architecture here too
02: rebase on 01
03: rebase

v3:
02: fix typo in assert, to fix build

v2:
01,02: new patches

03: - improve comment
- fix assert in bdrv_aligned_pwritev
- add asserts to not use the flag on read requests
- support copy_range

04: - expand "detected cases" range
- s/fleecing/serialize_target_writes
- support backup_cow_with_offload
- drop restriction on compressed writes

v1 cover:

It's a continuation of discussion under
"[PATCH v2 2/3] block/fleecing-filter: new filter driver for fleecing" [1].

Here is my try to implement Kevin's idea, that all backup writes (for fleecing case) should be serialized. (However, I've skipped for now fixing related permissions).

Looks like these patches may replace patch [1], to make fleecing scheme safe. But I'm not sure, a look by Kevin is necessary.

A test is still needed, to prove that this patch is necessary and that it works..

PS: 222 now fails for me, no matter with or without these series:

    222         [failed, exit status 1] - output mismatch (see 222.out.bad)
    --- /work/src/qemu/up-new-fleecing/tests/qemu-iotests/222.out   2018-07-03 20:18:24.247252451 +0300
    +++ /work/src/qemu/up-new-fleecing/tests/qemu-iotests/222.out.bad       2018-07-09 19:36:39.586747425 +0300
    @@ -40,28 +40,7 @@
     --- Verifying Data ---
     
     read -P0x5d 0 64k
    -read -P0xd5 1M 64k
    -read -P0xdc 32M 64k
    -read -P0xcd 0x3ff0000 64k
    -read -P0 0x00f8000 32k
    -read -P0 0x2010000 32k
    -read -P0 0x3fe0000 64k
    -
    ---- Cleanup ---
    -
    -{u'return': {}}
    -{u'timestamp': {u'seconds': 'SECS', u'microseconds': 'USECS'}, u'data': {u'device': u'drive0', u'type': u'backup', u'speed': 0, u'len': 67108864, u'offset': 393216}, u'event': u'BLOCK_JOB_CANCELLED'}
    -{u'return': {}}
    -{u'return': {}}
    -
    ---- Confirming writes ---
    -
    -read -P0xab 0 64k
    -read -P0xad 0x00f8000 64k
    -read -P0x1d 0x2008000 64k
    -read -P0xea 0x3fe0000 64k
    -read -P0xd5 0x108000 32k
    -read -P0xdc 32M 32k
    -read -P0xcd 0x3ff0000 64k
    -
    -Done
    +Traceback (most recent call last):
    +  File "222", line 132, in <module>
    +    assert qemu_io_silent('-r', '-f', 'raw', '-c', cmd, nbd_uri) == 0
    +AssertionError
    Failures: 222
    Failed 1 of 1 tests

Vladimir Sementsov-Ogievskiy (4):
block/io: fix copy_range
block: split flags in copy_range
block: add BDRV_REQ_SERIALISING flag block/backup: fix fleecing scheme: use serialized writes

 include/block/block.h          |  27 ++++++++++-
 include/block/block_int.h      |  14 ++++--
 include/sysemu/block-backend.h |   3 +-
 block/backup.c                 |  20 +++++---
 block/block-backend.c          |   5 +-
 block/file-posix.c             |  21 ++++----
 block/io.c                     | 106 ++++++++++++++++++++++++++++-------------
 block/iscsi.c                  |   9 ++--
 block/qcow2.c                  |  20 ++++----
 block/raw-format.c             |  24 ++++++----
 qemu-img.c                     |   2 +-
 11 files changed, 174 insertions(+), 77 deletions(-)
Signature · 1 line
2.11.1