qemu-e2k/include
Dietmar Maurer 98d2c6f2cd block: add basic backup support to block driver
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 <dietmar@proxmox.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-06-28 09:20:26 +02:00
..
block block: add basic backup support to block driver 2013-06-28 09:20:26 +02:00
disas Add moxie disassembler 2013-03-23 14:25:41 +00:00
exec rdma: introduce qemu_ram_foreach_block() 2013-06-27 02:38:36 +02:00
fpu softfloat: Implement uint64_to_float128 2013-01-05 10:12:50 +00:00
hw linux-user: Fix compilation failure 2013-06-27 15:38:35 -05:00
migration linux-user: Fix compilation failure 2013-06-27 15:38:35 -05:00
monitor add a new qevent: QEVENT_GUEST_PANICKED 2013-04-30 10:30:01 -05:00
net hw: move headers to include/ 2013-04-08 18:13:10 +02:00
qapi qerror: drop QERR_OPEN_FILE_FAILED macro 2013-06-17 11:01:14 -04:00
qemu notify: add NotiferWithReturn so notifier list can abort 2013-06-28 09:20:26 +02:00
qom cpu: Turn cpu_get_memory_mapping() into a CPUState hook 2013-06-11 18:03:35 +02:00
sysemu dma: eliminate DMAContext 2013-06-20 16:39:52 +02:00
ui vnc: use booleans for vnc_connect, vnc_listen_read and vnc_display_add_client 2013-06-21 22:52:50 +04:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h include/elf.h: add aarch64 ELF machine and relocs 2013-06-12 16:20:22 +01:00
glib-compat.h glib: add a compatibility interface for g_timeout_add_seconds 2013-03-25 13:10:40 -05:00
qemu-common.h create qemu_openpty_raw() helper function and move it to a separate file 2013-06-14 14:28:43 +04:00
qemu-io.h qemu-io: Interface cleanup 2013-06-06 11:27:05 +02:00
trace.h build: some simplifications for "trace/Makefile.objs" 2013-01-12 18:42:51 +01:00