[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/10] drive-backup: added support for data comp
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 06/10] drive-backup: added support for data compression |
Date: |
Mon, 16 May 2016 10:59:35 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 05/14/2016 06:45 AM, Denis V. Lunev wrote:
> From: Pavel Butsykin <address@hidden>
>
> 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.
>
> +++ b/qapi/block-core.json
> @@ -905,7 +905,7 @@
> { 'struct': 'DriveBackup',
> 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
> 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
> - '*speed': 'int', '*bitmap': 'str',
> + '*speed': 'int', '*bitmap': 'str', '*compress': 'bool',
Missing documentation of the new option.
> '*on-source-error': 'BlockdevOnError',
> '*on-target-error': 'BlockdevOnError' } }
>
> diff --git a/qmp-commands.hx b/qmp-commands.hx
> index 94847e5..8915a0b 100644
> --- a/qmp-commands.hx
> +++ b/qmp-commands.hx
> @@ -1186,7 +1186,8 @@ EQMP
> {
> .name = "drive-backup",
> .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
> - "bitmap:s?,on-source-error:s?,on-target-error:s?",
> + "bitmap:s?,compress:b?,"
> + "on-source-error:s?,on-target-error:s?",
> .mhandler.cmd_new = qmp_marshal_drive_backup,
> },
>
> @@ -1220,6 +1221,7 @@ Arguments:
> - "mode": whether and how QEMU should create a new image
> (NewImageMode, optional, default 'absolute-paths')
> - "speed": the maximum speed, in bytes per second (json-int, optional)
> +- "compress": compress data blocks (if the target format supports it).
Missing mention that it is optional, default false.
> - "on-source-error": the action to take on an error on the source, default
> 'report'. 'stop' and 'enospc' can only be used
> if the block device supports io-status.
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 01/10] block/io: add bdrv_co_write_compressed, (continued)
- [Qemu-devel] [PATCH 05/10] block: remove BlockDriver.bdrv_write_compressed, Denis V. Lunev, 2016/05/14
- [Qemu-devel] [PATCH 07/10] blockdev-backup: added support for data compression, Denis V. Lunev, 2016/05/14
- [Qemu-devel] [PATCH 06/10] drive-backup: added support for data compression, Denis V. Lunev, 2016/05/14
- [Qemu-devel] [PATCH 09/10] block: fix backup in vmdk format image, Denis V. Lunev, 2016/05/14
- [Qemu-devel] [PATCH 08/10] qemu-iotests: test backup compression in 055, Denis V. Lunev, 2016/05/14