qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/5] Discrad blocks during block-stream operation
@ 2018-11-22 18:48 Andrey Shinkevich
  2018-11-22 18:48 ` [Qemu-devel] [PATCH 1/5] Discard blocks while copy-on-read Andrey Shinkevich
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Andrey Shinkevich @ 2018-11-22 18:48 UTC (permalink / raw)
  To: qemu-devel, qemu-block
  Cc: jcody, kwolf, mreitz, armbru, dgilbert, eblake, den, vsementsov,
	andrey.shinkevich

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).
The permission to write into an inactive layer can not be obtained due to the
existing child permission mechanism. There is a commented up hack in the
callback function bdrv_stream_top_pwritev() in block/stream.c that redirects
write operations below the filter node. Being uncommented, it enables writing
into the inactive layer and passing all the iotests in the 030 file. Otherwise,
no WRITE permission is granted after the filter insertion above the target node.
Any suggestions to resolve that issue will be appreciated.

The suggestions of Dr. David Alan Gilbert and Alberto Garcia after their first
review have been applied.

Sincerely,

Andrey Shinkevich (5):
  Discard blocks while copy-on-read
  The discard flag for block stream operation
  iotests: allow resume_drive by node name
  iotests: prepare 030 for graph change
  iotests: 030 with block-stream discard

 block/stream.c                | 429 ++++++++++++++++++++++++++++++++++++++++--
 blockdev.c                    |   8 +-
 hmp-commands.hx               |   4 +-
 hmp.c                         |   4 +-
 include/block/block_int.h     |   2 +-
 qapi/block-core.json          |   5 +-
 tests/qemu-iotests/030        | 163 +++++++++++-----
 tests/qemu-iotests/030.out    |   4 +-
 tests/qemu-iotests/iotests.py |   9 +-
 9 files changed, 558 insertions(+), 70 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-11-26 20:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-22 18:48 [Qemu-devel] [PATCH 0/5] Discrad blocks during block-stream operation Andrey Shinkevich
2018-11-22 18:48 ` [Qemu-devel] [PATCH 1/5] Discard blocks while copy-on-read Andrey Shinkevich
2018-11-22 18:48 ` [Qemu-devel] [PATCH 2/5] The discard flag for block stream operation Andrey Shinkevich
2018-11-23 10:01   ` Dr. David Alan Gilbert
2018-11-26 20:34   ` Eric Blake
2018-11-22 18:48 ` [Qemu-devel] [PATCH 3/5] iotests: allow resume_drive by node name Andrey Shinkevich
2018-11-23  7:46   ` [Qemu-devel] [Qemu-block] " Peter Krempa
2018-11-22 18:48 ` [Qemu-devel] [PATCH 4/5] iotests: prepare 030 for graph change Andrey Shinkevich
2018-11-22 18:48 ` [Qemu-devel] [PATCH 5/5] iotests: 030 with block-stream discard Andrey Shinkevich
2018-11-23  7:45 ` [Qemu-devel] [Qemu-block] [PATCH 0/5] Discrad blocks during block-stream operation Peter Krempa
2018-11-23 14:01   ` Andrey Shinkevich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).