errp);
if (!job) {
diff --git a/blockdev.c b/blockdev.c
-index e464daea58..1010b60804 100644
+index e464daea58..50e4a9c682 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2942,6 +2942,9 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
sync = MIRROR_SYNC_MODE_FULL;
}
-+ if (bitmap) {
++ if (bitmap_name) {
+ if (granularity) {
+ error_setg(errp, "Granularity and bitmap cannot both be set");
+ return;
1 file changed, 3 insertions(+)
diff --git a/blockdev.c b/blockdev.c
-index 1010b60804..19f490fce7 100644
+index 50e4a9c682..e6b2b1e338 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -3036,6 +3036,9 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
if (bitmap_mode != BITMAP_SYNC_MODE_NEVER) {
diff --git a/blockdev.c b/blockdev.c
-index 19f490fce7..9a010f3a86 100644
+index e6b2b1e338..bdae211a54 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -3015,7 +3015,36 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
+ if ((sync == MIRROR_SYNC_MODE_BITMAP) ||
+ (sync == MIRROR_SYNC_MODE_INCREMENTAL)) {
+ /* done before desugaring 'incremental' to print the right message */
-+ if (!bitmap) {
++ if (!bitmap_name) {
+ error_setg(errp, "Must provide a valid bitmap name for "
+ "'%s' sync mode", MirrorSyncMode_str(sync));
+ return;
+ bitmap_mode = BITMAP_SYNC_MODE_ON_SUCCESS;
+ }
+
- if (bitmap) {
+ if (bitmap_name) {
+ if (sync != MIRROR_SYNC_MODE_BITMAP) {
+ error_setg(errp, "Sync mode '%s' not supported with bitmap.",
+ MirrorSyncMode_str(sync));