]> Git Repo - qemu.git/commit
block: Add bitmap successors
authorJohn Snow <[email protected]>
Fri, 17 Apr 2015 23:49:57 +0000 (19:49 -0400)
committerKevin Wolf <[email protected]>
Tue, 28 Apr 2015 13:36:10 +0000 (15:36 +0200)
commit9bd2b08f27b9c27bb40d73b6466321b8c635086e
treef8c8bf726437f6313534e239daaf8caf4a463c37
parentb8e6fb752e43b45b428487c244cab35f0ab94b10
block: Add bitmap successors

A bitmap successor is an anonymous BdrvDirtyBitmap that is intended to
be created just prior to a sensitive operation (e.g. Incremental Backup)
that can either succeed or fail, but during the course of which we still
want a bitmap tracking writes.

On creating a successor, we "freeze" the parent bitmap which prevents
its deletion, enabling, anonymization, or creating a bitmap with the
same name.

On success, the parent bitmap can "abdicate" responsibility to the
successor, which will inherit its name. The successor will have been
tracking writes during the course of the backup operation. The parent
will be safely deleted.

On failure, we can "reclaim" the successor from the parent, unifying
them such that the resulting bitmap describes all writes occurring since
the last successful backup, for instance. Reclamation will thaw the
parent, but not explicitly re-enable it.

BdrvDirtyBitmap operations that target a single bitmap are protected
by assertions that the bitmap is not frozen and/or disabled.

BdrvDirtyBitmap operations that target a group of bitmaps, such as
bdrv_{set,reset}_dirty will ignore frozen/disabled drives with a
conditional instead.

Internal functions that enable/disable dirty bitmaps have assertions
added to them to prevent modifying frozen bitmaps.

Signed-off-by: John Snow <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: 1429314609[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block.c
blockdev.c
include/block/block.h
qapi/block-core.json
This page took 0.02528 seconds and 4 git commands to generate.