If we wish to make differential backups a feature that's easy to access,
it might be pertinent to rename the "dirty-bitmap" mode to "incremental"
to make it clear what /type/ of backup the dirty-bitmap is helping us
perform.
This is an API breaking change, but 2.4 has not yet gone live,
so we have this flexibility.
Signed-off-by: John Snow
---
block/backup.c| 10 +-
block/mirror.c| 4 ++--
docs/bitmaps.md | 8
include/block/block_int.h | 2 +-
qapi/block-core.json | 8
qmp-commands.hx | 6 +++---
tests/qemu-iotests/124| 10 +-
7 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/block/backup.c b/block/backup.c
index e681f1b..a8f7c43 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -37,7 +37,7 @@ typedef struct CowRequest {
typedef struct BackupBlockJob {
BlockJob common;
BlockDriverState *target;
-/* bitmap for sync=dirty-bitmap */
+/* bitmap for sync=incremental */
BdrvDirtyBitmap *sync_bitmap;
MirrorSyncMode sync_mode;
RateLimit limit;
@@ -390,7 +390,7 @@ static void coroutine_fn backup_run(void *opaque)
qemu_coroutine_yield();
job->common.busy = true;
}
-} else if (job->sync_mode == MIRROR_SYNC_MODE_DIRTY_BITMAP) {
+} else if (job->sync_mode == MIRROR_SYNC_MODE_INCREMENTAL) {
ret = backup_run_incremental(job);
} else {
/* Both FULL and TOP SYNC_MODE's require copying.. */
@@ -510,10 +510,10 @@ void backup_start(BlockDriverState *bs, BlockDriverState
*target,
return;
}
-if (sync_mode == MIRROR_SYNC_MODE_DIRTY_BITMAP) {
+if (sync_mode == MIRROR_SYNC_MODE_INCREMENTAL) {
if (!sync_bitmap) {
error_setg(errp, "must provide a valid bitmap name for "
- "\"dirty-bitmap\" sync mode");
+ "\"incremental\" sync mode");
return;
}
@@ -548,7 +548,7 @@ void backup_start(BlockDriverState *bs, BlockDriverState
*target,
job->on_target_error = on_target_error;
job->target = target;
job->sync_mode = sync_mode;
-job->sync_bitmap = sync_mode == MIRROR_SYNC_MODE_DIRTY_BITMAP ?
+job->sync_bitmap = sync_mode == MIRROR_SYNC_MODE_INCREMENTAL ?
sync_bitmap : NULL;
job->common.len = len;
job->common.co = qemu_coroutine_create(backup_run);
diff --git a/block/mirror.c b/block/mirror.c
index 58f391a..adf391c 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -709,8 +709,8 @@ void mirror_start(BlockDriverState *bs, BlockDriverState
*target,
bool is_none_mode;
BlockDriverState *base;
-if (mode == MIRROR_SYNC_MODE_DIRTY_BITMAP) {
-error_setg(errp, "Sync mode 'dirty-bitmap' not supported");
+if (mode == MIRROR_SYNC_MODE_INCREMENTAL) {
+error_setg(errp, "Sync mode 'incremental' not supported");
return;
}
is_none_mode = mode == MIRROR_SYNC_MODE_NONE;
diff --git a/docs/bitmaps.md b/docs/bitmaps.md
index a60fee1..9fd8ea6 100644
--- a/docs/bitmaps.md
+++ b/docs/bitmaps.md
@@ -206,7 +206,7 @@ full backup as a backing image.
"bitmap": "bitmap0",
"target": "incremental.0.img",
"format": "qcow2",
-"sync": "dirty-bitmap",
+"sync": "incremental",
"mode": "existing"
}
}
@@ -231,7 +231,7 @@ full backup as a backing image.
"bitmap": "bitmap0",
"target": "incremental.1.img",
"format": "qcow2",
-"sync": "dirty-bitmap",
+"sync": "incremental",
"mode": "existing"
}
}
@@ -271,7 +271,7 @@ full backup as a backing image.
"bitmap": "bitmap0",
"target": "incremental.0.img",
"format": "qcow2",
-"sync": "dirty-bitmap",
+"sync": "incremental",
"mode": "existing"
}
}
@@ -304,7 +304,7 @@ full backup as a backing image.
"bitmap": "bitmap0",
"target": "incremental.0.img",
"format": "qcow2",
-"sync": "dirty-bitmap",
+"sync": "incremental",
"mode": "existing"
}
}
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 5ca5f15..656abcf 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -613,7 +613,7 @@ void mirror_start(BlockDriverState *bs, BlockDriverState
*target,
* @target: Block device to write to.
* @speed: The maximum speed, in bytes per second, or 0 for unlimited.
* @sync_mode: What parts of the disk image should be copied to the
destination.
- * @sync_bitmap: The dirty bitmap if sync_mode is
MIRROR_SYNC_MODE_DIRTY_BITMAP.
+ * @sync_bitmap: The dirty bitmap if sync_mode is MIRROR_SYNC_MODE_INCREMENTAL.
* @on_source_error: The action to take upon error reading from the source.
* @on_target_error: The action to take upon error writing to the target.
* @cb: Completion function for the job.
diff --git a/qapi/block-core.