mbox series

[0/2] Discrad blocks during block-stream operation

Message ID 1541004440-182262-1-git-send-email-andrey.shinkevich@virtuozzo.com (mailing list archive)
Headers show
Series Discrad blocks during block-stream operation | expand

Message

Andrey Shinkevich Oct. 31, 2018, 4:47 p.m. UTC
Hello everyone!

The given feature discards blocks with copy-on-read operation while the
streaming process runs. Adding the 'discard' argument to the QMP block-stream
command allows dropping a block in the backing chain after it has been copied
to the active layer. That will elude the block duplication in the intermediate
backing file. It saves the disk space while external snapshots are being
merged.
The method involves the filter insertion above the active layer to allow write
operation in the backing chain. The method is similar to that in the 'commit
active' command (mirror.c).

Andrey Shinkevich (2):
  The discard flag for block stream operation
  Discard blocks while copy-on-read

 block/stream.c            | 402 ++++++++++++++++++++++++++++++++++++++++++++--
 blockdev.c                |   8 +-
 hmp-commands.hx           |   4 +-
 hmp.c                     |   4 +-
 include/block/block_int.h |   2 +-
 qapi/block-core.json      |   5 +-
 6 files changed, 407 insertions(+), 18 deletions(-)