On Tue, May 31, 2016 at 12:15:27PM +0300, Denis V. Lunev wrote: > From: Pavel Butsykin > > The idea is simple - backup is "written-once" data. It is written block > by block and it is large enough. It would be nice to save storage > space and compress it. > > The patch adds a flag to the qmp/hmp drive-backup command which enables > block compression. Compression should be implemented in the format driver > to enable this feature. > > There are some limitations of the format driver to allow compressed writes. > We can write data only once. Though for backup this is perfectly fine. > These limitations are maintained by the driver and the error will be > reported if we are doing something wrong. > > Signed-off-by: Pavel Butsykin > Signed-off-by: Denis V. Lunev > CC: Jeff Cody > CC: Markus Armbruster > CC: Eric Blake > CC: John Snow > CC: Stefan Hajnoczi > CC: Kevin Wolf > --- > block/backup.c | 13 +++++++++++++ > blockdev.c | 12 ++++++++++-- > hmp-commands.hx | 8 +++++--- > hmp.c | 3 ++- > include/block/block_int.h | 1 + > qapi/block-core.json | 5 ++++- > qmp-commands.hx | 5 ++++- > 7 files changed, 39 insertions(+), 8 deletions(-) Reviewed-by: Stefan Hajnoczi