[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for 2.7 0/2] backup compression
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH for 2.7 0/2] backup compression |
Date: |
Tue, 26 Apr 2016 10:46:54 +0100 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Sat, Apr 23, 2016 at 11:41:51AM +0300, Denis V. Lunev wrote:
> 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.
>
> These patches add the ability to compress data during backup. This
> functionality is implemented by means of adding options to the qmp/hmp
> commands(drive-backup, blockdev-backup). The implementation is quite
> simple, because the responsibility for data compression imposed on the
> format driver.
>
> Signed-off-by: Pavel Butsykin <address@hidden>
> Signed-off-by: Denis V. Lunev <address@hidden>
> CC: Jeff Cody <address@hidden>
> CC: Markus Armbruster <address@hidden>
> CC: Eric Blake <address@hidden>
> CC: John Snow <address@hidden>
>
> Pavel Butsykin (2):
> drive-backup: added support for data compression
> blockdev-backup: added support for data compression
>
> block/backup.c | 13 +++++++++++++
> blockdev.c | 20 ++++++++++++++++++--
> hmp-commands.hx | 8 +++++---
> hmp.c | 3 ++-
> include/block/block_int.h | 1 +
> qapi/block-core.json | 3 ++-
> qmp-commands.hx | 7 +++++--
> 7 files changed, 46 insertions(+), 9 deletions(-)
bdrv_write_compressed() hasn't been called from a running VM before, it
was purely a synchronous qemu-img operation. The
qcow2.c:qcow2_write_compressed() code doesn't seem to be written with
coroutine context in mind but I think the lock in
block/backup.c:backup_do_cow() will protect against race conditions.
Please include a test case (using qcow2?).
signature.asc
Description: PGP signature