[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 03/12] block: add basic backup support to blo
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v6 03/12] block: add basic backup support to block driver |
Date: |
Tue, 25 Jun 2013 15:00:58 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 24.06.2013 um 17:13 hat Stefan Hajnoczi geschrieben:
> From: Dietmar Maurer <address@hidden>
>
> backup_start() creates a block job that copies a point-in-time snapshot
> of a block device to a target block device.
>
> We call backup_do_cow() for each write during backup. That function
> reads the original data from the block device before it gets
> overwritten. The data is then written to the target device.
>
> Currently backup cluster size is hardcoded to 65536 bytes.
>
> [I made a number of changes to Dietmar's original patch and folded them
> in to make code review easy. Here is the full list:
>
> * Drop BackupDumpFunc interface in favor of a target block device
> * Detect zero clusters with buffer_is_zero() and use bdrv_co_write_zeroes()
> * Use 0 delay instead of 1us, like other block jobs
> * Unify creation/start functions into backup_start()
> * Simplify cleanup, free bitmap in backup_run() instead of cb
> * function
> * Use HBitmap to avoid duplicating bitmap code
> * Use bdrv_getlength() instead of accessing ->total_sectors
> * directly
> * Delete the backup.h header file, it is no longer necessary
> * Move ./backup.c to block/backup.c
> * Remove #ifdefed out code
> * Coding style and whitespace cleanups
> * Use bdrv_add_before_write_notifier() instead of blockjob-specific hooks
> * Keep our own in-flight CowRequest list instead of using block.c
> tracked requests. This means a little code duplication but is much
> simpler than trying to share the tracked requests list and use the
> backup block size.
> * Add on_source_error and on_target_error error handling.
> * Use trace events instead of DPRINTF()
>
> -- stefanha]
>
> Signed-off-by: Dietmar Maurer <address@hidden>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> +static BlockJobType backup_job_type = {
> + .instance_size = sizeof(BackupBlockJob),
> + .job_type = "backup",
> + .set_speed = backup_set_speed,
> + .iostatus_reset = backup_iostatus_reset,
> +};
const is still missing.
Kevin
- [Qemu-devel] [PATCH v6 00/12] block: drive-backup live backup command, Stefan Hajnoczi, 2013/06/24
- [Qemu-devel] [PATCH v6 01/12] notify: add NotiferWithReturn so notifier list can abort, Stefan Hajnoczi, 2013/06/24
- [Qemu-devel] [PATCH v6 09/12] blockdev: add DriveBackup transaction, Stefan Hajnoczi, 2013/06/24
- [Qemu-devel] [PATCH v6 08/12] blockdev: allow BdrvActionOps->commit() to be NULL, Stefan Hajnoczi, 2013/06/24
- [Qemu-devel] [PATCH v6 03/12] block: add basic backup support to block driver, Stefan Hajnoczi, 2013/06/24
- Re: [Qemu-devel] [PATCH v6 03/12] block: add basic backup support to block driver,
Kevin Wolf <=
- [Qemu-devel] [PATCH v6 10/12] blockdev: add Abort transaction, Stefan Hajnoczi, 2013/06/24
- [Qemu-devel] [PATCH v6 11/12] qemu-iotests: extract wait_until_completed() into iotests.py, Stefan Hajnoczi, 2013/06/24
- [Qemu-devel] [PATCH v6 05/12] blockdev: use bdrv_getlength() in qmp_drive_mirror(), Stefan Hajnoczi, 2013/06/24
- [Qemu-devel] [PATCH v6 02/12] block: add bdrv_add_before_write_notifier(), Stefan Hajnoczi, 2013/06/24
- [Qemu-devel] [PATCH v6 04/12] blockdev: drop redundant proto_drv check, Stefan Hajnoczi, 2013/06/24
- [Qemu-devel] [PATCH v6 06/12] block: add drive-backup QMP command, Stefan Hajnoczi, 2013/06/24
- [Qemu-devel] [PATCH v6 07/12] blockdev: rename BlkTransactionStates to singular, Stefan Hajnoczi, 2013/06/24
- [Qemu-devel] [PATCH v6 12/12] qemu-iotests: add 055 drive-backup test case, Stefan Hajnoczi, 2013/06/24
- Re: [Qemu-devel] [PATCH v6 00/12] block: drive-backup live backup command, Kevin Wolf, 2013/06/25