From patchwork Thu May 14 03:49:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1289840 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=SeFcpXdZ; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49MyHD1hl1z9sSm for ; Thu, 14 May 2020 13:50:16 +1000 (AEST) Received: from localhost ([::1]:54298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZ4sv-0008IZ-R6 for incoming@patchwork.ozlabs.org; Wed, 13 May 2020 23:50:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZ4sM-0008Hf-74 for qemu-devel@nongnu.org; Wed, 13 May 2020 23:49:38 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:48483 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jZ4sL-0008Os-54 for qemu-devel@nongnu.org; Wed, 13 May 2020 23:49:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589428175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DakAMMTOM/Cl2KoiyY6elE7hq/Egw2UX8VearchFniw=; b=SeFcpXdZU/g3LN+z3j/S0KKGVM29ZRMvdik5FtOsPcx3jvbBjYfZuSkJNZ7lawB4TeisRX kmEaAXd5oQou/8Mrby2Ak0cjFDpuwsx/CA+BOHGCiY1EHsPpkYkg8ZcDnF19AXOexXj6QE R0ubxbgiXx6MXFvHITqcEdfyVFFzuuw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-42-TaSIYb0ZNUak08Q3LKuexA-1; Wed, 13 May 2020 23:49:33 -0400 X-MC-Unique: TaSIYb0ZNUak08Q3LKuexA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DA52F464; Thu, 14 May 2020 03:49:32 +0000 (UTC) Received: from probe.redhat.com (ovpn-113-9.rdu2.redhat.com [10.10.113.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id C93E07529E; Thu, 14 May 2020 03:49:27 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH RFC v2 1/5] block: add bitmap-populate job Date: Wed, 13 May 2020 23:49:18 -0400 Message-Id: <20200514034922.24834-2-jsnow@redhat.com> In-Reply-To: <20200514034922.24834-1-jsnow@redhat.com> References: <20200514034922.24834-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/13 22:25:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , pkrempa@redhat.com, Eduardo Habkost , qemu-block@nongnu.org, John Snow , Markus Armbruster , Max Reitz , vsementsov@virtuozzo.com, Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This job copies the allocation map into a bitmap. It's a job because there's no guarantee that allocation interrogation will be quick (or won't hang), so it cannot be retrofit into block-dirty-bitmap-merge. It was designed with different possible population patterns in mind, but only top layer allocation was implemented for now. Signed-off-by: John Snow --- qapi/block-core.json | 48 +++++++++ qapi/job.json | 2 +- include/block/block_int.h | 21 ++++ block/bitmap-alloc.c | 207 ++++++++++++++++++++++++++++++++++++++ blockjob.c | 3 +- block/Makefile.objs | 1 + 6 files changed, 280 insertions(+), 2 deletions(-) create mode 100644 block/bitmap-alloc.c diff --git a/qapi/block-core.json b/qapi/block-core.json index 943df1926a..0fb527a9a1 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2202,6 +2202,54 @@ { 'command': 'block-dirty-bitmap-merge', 'data': 'BlockDirtyBitmapMerge' } +## +# @BitmapPattern: +# +# An enumeration of possible patterns that can be written into a bitmap. +# +# @allocation-top: The allocation status of the top layer +# of the attached storage node. +# +# Since: 5.0 +## +{ 'enum': 'BitmapPattern', + 'data': ['allocation-top'] } + +## +# @BlockDirtyBitmapPopulate: +# +# @job-id: identifier for the newly-created block job. +# +# @pattern: What pattern should be written into the bitmap? +# +# @on-error: the action to take if an error is encountered on a bitmap's +# attached node, default 'report'. +# 'stop' and 'enospc' can only be used if the block device supports +# io-status (see BlockInfo). +# +# @auto-finalize: When false, this job will wait in a PENDING state after it has +# finished its work, waiting for @block-job-finalize before +# making any block graph changes. +# When true, this job will automatically +# perform its abort or commit actions. +# Defaults to true. +# +# @auto-dismiss: When false, this job will wait in a CONCLUDED state after it +# has completely ceased all work, and awaits @block-job-dismiss. +# When true, this job will automatically disappear from the query +# list without user intervention. +# Defaults to true. +# +# Since: 5.0 +## +{ 'struct': 'BlockDirtyBitmapPopulate', + 'base': 'BlockDirtyBitmap', + 'data': { 'job-id': 'str', + 'pattern': 'BitmapPattern', + '*on-error': 'BlockdevOnError', + '*auto-finalize': 'bool', + '*auto-dismiss': 'bool' } } + ## # @BlockDirtyBitmapSha256: # diff --git a/qapi/job.json b/qapi/job.json index 5e658281f5..5f496d4630 100644 --- a/qapi/job.json +++ b/qapi/job.json @@ -22,7 +22,7 @@ # Since: 1.7 ## { 'enum': 'JobType', - 'data': ['commit', 'stream', 'mirror', 'backup', 'create'] } + 'data': ['commit', 'stream', 'mirror', 'backup', 'create', 'bitmap-populate'] } ## # @JobStatus: diff --git a/include/block/block_int.h b/include/block/block_int.h index df6d0273d6..eb68a5639a 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -1222,6 +1222,27 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs, BlockCompletionFunc *cb, void *opaque, JobTxn *txn, Error **errp); +/* + * bitpop_job_create: Create a new bitmap population job. + * + * @job_id: The id of the newly-created job. + * @bs: Block device associated with the @target_bitmap. + * @target_bitmap: The bitmap to populate. + * @on_error: What to do if an error on @bs is encountered. + * @creation_flags: Flags that control the behavior of the Job lifetime. + * See @BlockJobCreateFlags + * @cb: Completion function for the job. + * @opaque: Opaque pointer value passed to @cb. + * @txn: Transaction that this job is part of (may be NULL). + */ +BlockJob *bitpop_job_create(const char *job_id, BlockDriverState *bs, + BdrvDirtyBitmap *target_bitmap, + BitmapPattern pattern, + BlockdevOnError on_error, + int creation_flags, + BlockCompletionFunc *cb, void *opaque, + JobTxn *txn, Error **errp); + BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs, const char *child_name, const BdrvChildRole *child_role, diff --git a/block/bitmap-alloc.c b/block/bitmap-alloc.c new file mode 100644 index 0000000000..47d542dc12 --- /dev/null +++ b/block/bitmap-alloc.c @@ -0,0 +1,207 @@ +/* + * Async Dirty Bitmap Populator + * + * Copyright (C) 2020 Red Hat, Inc. + * + * Authors: + * John Snow + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + * + */ + +#include "qemu/osdep.h" + +#include "trace.h" +#include "block/block.h" +#include "block/block_int.h" +#include "block/blockjob_int.h" +#include "block/block_backup.h" +#include "block/block-copy.h" +#include "qapi/error.h" +#include "qapi/qmp/qerror.h" +#include "qemu/ratelimit.h" +#include "qemu/cutils.h" +#include "sysemu/block-backend.h" +#include "qemu/bitmap.h" +#include "qemu/error-report.h" + +typedef struct BitpopBlockJob { + BlockJob common; + BlockDriverState *bs; + BdrvDirtyBitmap *target_bitmap; + BdrvDirtyBitmap *new_bitmap; + BlockdevOnError on_error; + uint64_t len; +} BitpopBlockJob; + +static const BlockJobDriver bitpop_job_driver; + +static void bitpop_commit(Job *job) +{ + BitpopBlockJob *s = container_of(job, BitpopBlockJob, common.job); + + bdrv_dirty_bitmap_merge_internal(s->target_bitmap, s->new_bitmap, + NULL, true); +} + +/* no abort needed; just clean without committing. */ + +static void bitpop_clean(Job *job) +{ + BitpopBlockJob *s = container_of(job, BitpopBlockJob, common.job); + + bdrv_release_dirty_bitmap(s->new_bitmap); + bdrv_dirty_bitmap_set_busy(s->target_bitmap, false); +} + +static BlockErrorAction bitpop_error_action(BitpopBlockJob *job, int error) +{ + return block_job_error_action(&job->common, job->on_error, true, error); +} + +static bool coroutine_fn yield_and_check(Job *job) +{ + if (job_is_cancelled(job)) { + return true; + } + + job_sleep_ns(job, 0); + + if (job_is_cancelled(job)) { + return true; + } + + return false; +} + +static int coroutine_fn bitpop_run(Job *job, Error **errp) +{ + BitpopBlockJob *s = container_of(job, BitpopBlockJob, common.job); + int ret = 0; + int64_t offset; + int64_t count; + int64_t bytes; + + for (offset = 0; offset < s->len; ) { + if (yield_and_check(job)) { + ret = -ECANCELED; + break; + } + + bytes = s->len - offset; + ret = bdrv_is_allocated(s->bs, offset, bytes, &count); + if (ret < 0) { + if (bitpop_error_action(s, -ret) == BLOCK_ERROR_ACTION_REPORT) { + break; + } + continue; + } + + if (!count) { + ret = 0; + break; + } + + if (ret) { + bdrv_set_dirty_bitmap(s->new_bitmap, offset, count); + ret = 0; + } + + job_progress_update(job, count); + offset += count; + } + + return ret; +} + +static const BlockJobDriver bitpop_job_driver = { + .job_driver = { + .instance_size = sizeof(BitpopBlockJob), + .job_type = JOB_TYPE_BITMAP_POPULATE, + .free = block_job_free, + .user_resume = block_job_user_resume, + .run = bitpop_run, + .commit = bitpop_commit, + .clean = bitpop_clean, + } +}; + + +BlockJob *bitpop_job_create( + const char *job_id, + BlockDriverState *bs, + BdrvDirtyBitmap *target_bitmap, + BitmapPattern pattern, + BlockdevOnError on_error, + int creation_flags, + BlockCompletionFunc *cb, + void *opaque, + JobTxn *txn, + Error **errp) +{ + int64_t len; + BitpopBlockJob *job = NULL; + int64_t cluster_size; + BdrvDirtyBitmap *new_bitmap = NULL; + + assert(bs); + assert(target_bitmap); + + if (!bdrv_is_inserted(bs)) { + error_setg(errp, "Device is not inserted: %s", + bdrv_get_device_name(bs)); + return NULL; + } + + if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_BACKUP_SOURCE, errp)) { + return NULL; + } + + if (bdrv_dirty_bitmap_check(target_bitmap, BDRV_BITMAP_DEFAULT, errp)) { + return NULL; + } + + if (pattern != BITMAP_PATTERN_ALLOCATION_TOP) { + error_setg(errp, "Unrecognized bitmap pattern"); + return NULL; + } + + len = bdrv_getlength(bs); + if (len < 0) { + error_setg_errno(errp, -len, "unable to get length for '%s'", + bdrv_get_device_name(bs)); + return NULL; + } + + /* NB: new bitmap is anonymous and enabled */ + cluster_size = bdrv_dirty_bitmap_granularity(target_bitmap); + new_bitmap = bdrv_create_dirty_bitmap(bs, cluster_size, NULL, errp); + if (!new_bitmap) { + return NULL; + } + + /* Take ownership; we reserve the right to write into this on-commit. */ + bdrv_dirty_bitmap_set_busy(target_bitmap, true); + + job = block_job_create(job_id, &bitpop_job_driver, txn, bs, + BLK_PERM_CONSISTENT_READ, + BLK_PERM_ALL & ~BLK_PERM_RESIZE, + 0, creation_flags, + cb, opaque, errp); + if (!job) { + bdrv_dirty_bitmap_set_busy(target_bitmap, false); + bdrv_release_dirty_bitmap(new_bitmap); + return NULL; + } + + job->bs = bs; + job->on_error = on_error; + job->target_bitmap = target_bitmap; + job->new_bitmap = new_bitmap; + job->len = len; + job_progress_set_remaining(&job->common.job, job->len); + + return &job->common; +} diff --git a/blockjob.c b/blockjob.c index 2affa1844d..991d9167a2 100644 --- a/blockjob.c +++ b/blockjob.c @@ -56,7 +56,8 @@ static bool is_block_job(Job *job) return job_type(job) == JOB_TYPE_BACKUP || job_type(job) == JOB_TYPE_COMMIT || job_type(job) == JOB_TYPE_MIRROR || - job_type(job) == JOB_TYPE_STREAM; + job_type(job) == JOB_TYPE_STREAM || + job_type(job) == JOB_TYPE_BITMAP_POPULATE; } BlockJob *block_job_next(BlockJob *bjob) diff --git a/block/Makefile.objs b/block/Makefile.objs index 3635b6b4c1..87357529f3 100644 --- a/block/Makefile.objs +++ b/block/Makefile.objs @@ -36,6 +36,7 @@ block-obj-$(CONFIG_LIBSSH) += ssh.o block-obj-y += accounting.o dirty-bitmap.o block-obj-y += write-threshold.o block-obj-y += backup.o +block-obj-y += bitmap-alloc.o block-obj-$(CONFIG_REPLICATION) += replication.o block-obj-y += throttle.o copy-on-read.o block-obj-y += block-copy.o From patchwork Thu May 14 03:49:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1289841 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bCXTgt4+; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49MyHM01V5z9sSr for ; Thu, 14 May 2020 13:50:23 +1000 (AEST) Received: from localhost ([::1]:54926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZ4t2-00006C-L7 for incoming@patchwork.ozlabs.org; Wed, 13 May 2020 23:50:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZ4sS-0008VP-An for qemu-devel@nongnu.org; Wed, 13 May 2020 23:49:44 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:49332 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jZ4sR-0008PD-Bg for qemu-devel@nongnu.org; Wed, 13 May 2020 23:49:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589428182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yfimXGLJB+UJS1On95ecDTDtyczxeKMoMpfUjJAS63M=; b=bCXTgt4+S62KKhrFQcQnFyOhITJ6Yw81+IFid5Myld9bYY/mD7nU8GRq86xLw9cqdXV3Fr iXXGBXiSJTHFIqIIp+U/0kkLht9jUJ13HUdzvBrDOLisIM3SJoFZXqKR6lfhynZopKVEyW +kOqGunmKltCw2Liil7Lpi/S6c3/t34= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-97-zJU1430fMv-LCXrOuKRhFA-1; Wed, 13 May 2020 23:49:40 -0400 X-MC-Unique: zJU1430fMv-LCXrOuKRhFA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 72ACD835B41; Thu, 14 May 2020 03:49:39 +0000 (UTC) Received: from probe.redhat.com (ovpn-113-9.rdu2.redhat.com [10.10.113.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 229FE7529E; Thu, 14 May 2020 03:49:32 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH RFC v2 2/5] blockdev: combine DriveBackupState and BlockdevBackupState Date: Wed, 13 May 2020 23:49:19 -0400 Message-Id: <20200514034922.24834-3-jsnow@redhat.com> In-Reply-To: <20200514034922.24834-1-jsnow@redhat.com> References: <20200514034922.24834-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=jsnow@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/13 22:25:46 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , pkrempa@redhat.com, Eduardo Habkost , qemu-block@nongnu.org, John Snow , Markus Armbruster , Max Reitz , vsementsov@virtuozzo.com, Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" They have the same fields -- rename it BlockJobState. Signed-off-by: John Snow Reviewed-by: Eric Blake --- blockdev.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/blockdev.c b/blockdev.c index b3c840ec03..d3e8a6ca22 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1702,11 +1702,11 @@ static void external_snapshot_clean(BlkActionState *common) aio_context_release(aio_context); } -typedef struct DriveBackupState { +typedef struct BlockJobActionState { BlkActionState common; BlockDriverState *bs; BlockJob *job; -} DriveBackupState; +} BlockJobActionState; static BlockJob *do_backup_common(BackupCommon *backup, BlockDriverState *bs, @@ -1716,7 +1716,7 @@ static BlockJob *do_backup_common(BackupCommon *backup, static void drive_backup_prepare(BlkActionState *common, Error **errp) { - DriveBackupState *state = DO_UPCAST(DriveBackupState, common, common); + BlockJobActionState *state = DO_UPCAST(BlockJobActionState, common, common); DriveBackup *backup; BlockDriverState *bs; BlockDriverState *target_bs; @@ -1853,7 +1853,7 @@ out: static void drive_backup_commit(BlkActionState *common) { - DriveBackupState *state = DO_UPCAST(DriveBackupState, common, common); + BlockJobActionState *state = DO_UPCAST(BlockJobActionState, common, common); AioContext *aio_context; aio_context = bdrv_get_aio_context(state->bs); @@ -1867,7 +1867,7 @@ static void drive_backup_commit(BlkActionState *common) static void drive_backup_abort(BlkActionState *common) { - DriveBackupState *state = DO_UPCAST(DriveBackupState, common, common); + BlockJobActionState *state = DO_UPCAST(BlockJobActionState, common, common); if (state->job) { AioContext *aio_context; @@ -1883,7 +1883,7 @@ static void drive_backup_abort(BlkActionState *common) static void drive_backup_clean(BlkActionState *common) { - DriveBackupState *state = DO_UPCAST(DriveBackupState, common, common); + BlockJobActionState *state = DO_UPCAST(BlockJobActionState, common, common); AioContext *aio_context; if (!state->bs) { @@ -1898,15 +1898,9 @@ static void drive_backup_clean(BlkActionState *common) aio_context_release(aio_context); } -typedef struct BlockdevBackupState { - BlkActionState common; - BlockDriverState *bs; - BlockJob *job; -} BlockdevBackupState; - static void blockdev_backup_prepare(BlkActionState *common, Error **errp) { - BlockdevBackupState *state = DO_UPCAST(BlockdevBackupState, common, common); + BlockJobActionState *state = DO_UPCAST(BlockJobActionState, common, common); BlockdevBackup *backup; BlockDriverState *bs; BlockDriverState *target_bs; @@ -1954,7 +1948,7 @@ static void blockdev_backup_prepare(BlkActionState *common, Error **errp) static void blockdev_backup_commit(BlkActionState *common) { - BlockdevBackupState *state = DO_UPCAST(BlockdevBackupState, common, common); + BlockJobActionState *state = DO_UPCAST(BlockJobActionState, common, common); AioContext *aio_context; aio_context = bdrv_get_aio_context(state->bs); @@ -1968,7 +1962,7 @@ static void blockdev_backup_commit(BlkActionState *common) static void blockdev_backup_abort(BlkActionState *common) { - BlockdevBackupState *state = DO_UPCAST(BlockdevBackupState, common, common); + BlockJobActionState *state = DO_UPCAST(BlockJobActionState, common, common); if (state->job) { AioContext *aio_context; @@ -1984,7 +1978,7 @@ static void blockdev_backup_abort(BlkActionState *common) static void blockdev_backup_clean(BlkActionState *common) { - BlockdevBackupState *state = DO_UPCAST(BlockdevBackupState, common, common); + BlockJobActionState *state = DO_UPCAST(BlockJobActionState, common, common); AioContext *aio_context; if (!state->bs) { @@ -2265,14 +2259,14 @@ static const BlkActionOps actions[] = { .clean = external_snapshot_clean, }, [TRANSACTION_ACTION_KIND_DRIVE_BACKUP] = { - .instance_size = sizeof(DriveBackupState), + .instance_size = sizeof(BlockJobActionState), .prepare = drive_backup_prepare, .commit = drive_backup_commit, .abort = drive_backup_abort, .clean = drive_backup_clean, }, [TRANSACTION_ACTION_KIND_BLOCKDEV_BACKUP] = { - .instance_size = sizeof(BlockdevBackupState), + .instance_size = sizeof(BlockJobActionState), .prepare = blockdev_backup_prepare, .commit = blockdev_backup_commit, .abort = blockdev_backup_abort, From patchwork Thu May 14 03:49:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1289843 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DGh1p2Dt; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49MyK63xrVz9sSm for ; Thu, 14 May 2020 13:51:54 +1000 (AEST) Received: from localhost ([::1]:32924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZ4uW-0002jp-6r for incoming@patchwork.ozlabs.org; Wed, 13 May 2020 23:51:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZ4sY-0000Hy-LW for qemu-devel@nongnu.org; Wed, 13 May 2020 23:49:50 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:53395 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jZ4sX-0008Pd-O1 for qemu-devel@nongnu.org; Wed, 13 May 2020 23:49:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589428189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YwgeYTj6shlJEcWAb0bpxoHNzTl6kakit/yby4UtizQ=; b=DGh1p2DtrLcL5DPM3MVetlQumNerPMPCwkECMm8F3uOXAC2QPx2MMCiR1sefba/Uf+wXgw 90ufh317LGqldWvYK4/Kh2FZ0QpM5dDQ5aurgRE8wrM20oWzKn4lI5ilEnICFYYmbc8GTH 38K1drdnQRlWio/DAyI7mkKwKo1ynXA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-339-Ep07ldf1MiaYAdLvaDypSw-1; Wed, 13 May 2020 23:49:45 -0400 X-MC-Unique: Ep07ldf1MiaYAdLvaDypSw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 76844107ACF6; Thu, 14 May 2020 03:49:44 +0000 (UTC) Received: from probe.redhat.com (ovpn-113-9.rdu2.redhat.com [10.10.113.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC9E47529E; Thu, 14 May 2020 03:49:39 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH RFC v2 3/5] qmp: expose block-dirty-bitmap-populate Date: Wed, 13 May 2020 23:49:20 -0400 Message-Id: <20200514034922.24834-4-jsnow@redhat.com> In-Reply-To: <20200514034922.24834-1-jsnow@redhat.com> References: <20200514034922.24834-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=jsnow@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/13 22:25:46 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , pkrempa@redhat.com, Eduardo Habkost , qemu-block@nongnu.org, John Snow , Markus Armbruster , Max Reitz , vsementsov@virtuozzo.com, Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This is a new job-creating command. Signed-off-by: John Snow --- qapi/block-core.json | 18 +++++++++++ qapi/transaction.json | 2 ++ blockdev.c | 74 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) diff --git a/qapi/block-core.json b/qapi/block-core.json index 0fb527a9a1..f7cae77fc9 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2250,6 +2250,24 @@ '*auto-finalize': 'bool', '*auto-dismiss': 'bool' } } +## +# @block-dirty-bitmap-populate: +# +# Creates a new job that writes a pattern into a dirty bitmap. +# +# Since: 5.0 +# +# Example: +# +# -> { "execute": "block-dirty-bitmap-populate", +# "arguments": { "node": "drive0", "target": "bitmap0", +# "job-id": "job0", "pattern": "allocate-top" } } +# <- { "return": {} } +# +## +{ 'command': 'block-dirty-bitmap-populate', 'boxed': true, + 'data': 'BlockDirtyBitmapPopulate' } + ## # @BlockDirtyBitmapSha256: # diff --git a/qapi/transaction.json b/qapi/transaction.json index b6c11158f0..44be517de5 100644 --- a/qapi/transaction.json +++ b/qapi/transaction.json @@ -50,6 +50,7 @@ # - @block-dirty-bitmap-enable: since 4.0 # - @block-dirty-bitmap-disable: since 4.0 # - @block-dirty-bitmap-merge: since 4.0 +# - @block-dirty-bitmap-populate: since 5.0 # - @blockdev-backup: since 2.3 # - @blockdev-snapshot: since 2.5 # - @blockdev-snapshot-internal-sync: since 1.7 @@ -67,6 +68,7 @@ 'block-dirty-bitmap-enable': 'BlockDirtyBitmap', 'block-dirty-bitmap-disable': 'BlockDirtyBitmap', 'block-dirty-bitmap-merge': 'BlockDirtyBitmapMerge', + 'block-dirty-bitmap-populate': 'BlockDirtyBitmapPopulate', 'blockdev-backup': 'BlockdevBackup', 'blockdev-snapshot': 'BlockdevSnapshot', 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal', diff --git a/blockdev.c b/blockdev.c index d3e8a6ca22..08844e9e33 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2233,6 +2233,63 @@ static void block_dirty_bitmap_remove_commit(BlkActionState *common) bdrv_release_dirty_bitmap(state->bitmap); } +static void block_dirty_bitmap_populate_prepare(BlkActionState *common, + Error **errp) +{ + BlockJobActionState *state = DO_UPCAST(BlockJobActionState, common, common); + BlockDirtyBitmapPopulate *bitpop; + BlockDriverState *bs; + AioContext *aio_context; + BdrvDirtyBitmap *bmap = NULL; + int job_flags = JOB_DEFAULT; + + assert(common->action->type == \ + TRANSACTION_ACTION_KIND_BLOCK_DIRTY_BITMAP_POPULATE); + bitpop = common->action->u.block_dirty_bitmap_populate.data; + + bmap = block_dirty_bitmap_lookup(bitpop->node, bitpop->name, &bs, errp); + if (!bmap) { + return; + } + + aio_context = bdrv_get_aio_context(bs); + aio_context_acquire(aio_context); + state->bs = bs; + + /* Paired with .clean() */ + bdrv_drained_begin(state->bs); + + if (!bitpop->has_on_error) { + bitpop->on_error = BLOCKDEV_ON_ERROR_REPORT; + } + if (!bitpop->has_auto_finalize) { + bitpop->auto_finalize = true; + } + if (!bitpop->has_auto_dismiss) { + bitpop->auto_dismiss = true; + } + + if (!bitpop->auto_finalize) { + job_flags |= JOB_MANUAL_FINALIZE; + } + if (!bitpop->auto_dismiss) { + job_flags |= JOB_MANUAL_DISMISS; + } + + state->job = bitpop_job_create( + bitpop->job_id, + bs, + bmap, + bitpop->pattern, + bitpop->on_error, + job_flags, + NULL, NULL, + common->block_job_txn, + errp); + + aio_context_release(aio_context); +} + static void abort_prepare(BlkActionState *common, Error **errp) { error_setg(errp, "Transaction aborted using Abort action"); @@ -2316,6 +2373,13 @@ static const BlkActionOps actions[] = { .commit = block_dirty_bitmap_remove_commit, .abort = block_dirty_bitmap_remove_abort, }, + [TRANSACTION_ACTION_KIND_BLOCK_DIRTY_BITMAP_POPULATE] = { + .instance_size = sizeof(BlockJobActionState), + .prepare = block_dirty_bitmap_populate_prepare, + .commit = blockdev_backup_commit, + .abort = blockdev_backup_abort, + .clean = blockdev_backup_clean, + }, /* Where are transactions for MIRROR, COMMIT and STREAM? * Although these blockjobs use transaction callbacks like the backup job, * these jobs do not necessarily adhere to transaction semantics. @@ -2672,6 +2736,16 @@ void qmp_block_dirty_bitmap_merge(const char *node, const char *target, do_block_dirty_bitmap_merge(node, target, bitmaps, NULL, errp); } +void qmp_block_dirty_bitmap_populate(BlockDirtyBitmapPopulate *bitpop, + Error **errp) +{ + TransactionAction action = { + .type = TRANSACTION_ACTION_KIND_BLOCK_DIRTY_BITMAP_POPULATE, + .u.block_dirty_bitmap_populate.data = bitpop, + }; + blockdev_do_action(&action, errp); +} + BlockDirtyBitmapSha256 *qmp_x_debug_block_dirty_bitmap_sha256(const char *node, const char *name, Error **errp) From patchwork Thu May 14 03:49:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1289844 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=JVb9JtV1; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49MyKQ6PJyz9sSm for ; Thu, 14 May 2020 13:52:10 +1000 (AEST) Received: from localhost ([::1]:34310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZ4um-0003HE-J8 for incoming@patchwork.ozlabs.org; Wed, 13 May 2020 23:52:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZ4sg-0000PH-7I for qemu-devel@nongnu.org; Wed, 13 May 2020 23:49:58 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:36854 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jZ4sc-0008Q3-Mz for qemu-devel@nongnu.org; Wed, 13 May 2020 23:49:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589428193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Uj9DBXnyca0cPiV/FJONIX2DYp5xxPapWVzr9yvP9Y8=; b=JVb9JtV1eHi9QaBmbvBZ3zZ/JrTa5uW2RRnpn6wVt4euqtM8v301R8iKVTIYZw4uGbgQbk vN3c8p1uiCECHOZYIOf/zRpxq5zDVUzweVKUD4J1nd/8LuFKQO0cuiOkEtk9T+SWaX/Jmc AlvwuQAlDC/+ne/4NubMovxMROjWCMk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-162-jSCwh7C-OPuy1HzT8YSwVg-1; Wed, 13 May 2020 23:49:49 -0400 X-MC-Unique: jSCwh7C-OPuy1HzT8YSwVg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 830B5835B43; Thu, 14 May 2020 03:49:48 +0000 (UTC) Received: from probe.redhat.com (ovpn-113-9.rdu2.redhat.com [10.10.113.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB4FE7836E; Thu, 14 May 2020 03:49:44 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH RFC v2 4/5] iotests: move bitmap helpers into their own file Date: Wed, 13 May 2020 23:49:21 -0400 Message-Id: <20200514034922.24834-5-jsnow@redhat.com> In-Reply-To: <20200514034922.24834-1-jsnow@redhat.com> References: <20200514034922.24834-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=jsnow@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/13 22:25:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , pkrempa@redhat.com, Eduardo Habkost , qemu-block@nongnu.org, John Snow , Markus Armbruster , Max Reitz , vsementsov@virtuozzo.com, Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: John Snow --- tests/qemu-iotests/257 | 110 +--------------------------- tests/qemu-iotests/bitmaps.py | 131 ++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+), 109 deletions(-) create mode 100644 tests/qemu-iotests/bitmaps.py diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257 index 2933e2670b..adf4cdfe6e 100755 --- a/tests/qemu-iotests/257 +++ b/tests/qemu-iotests/257 @@ -24,120 +24,12 @@ import os import iotests from iotests import log, qemu_img +from bitmaps import EmulatedBitmap, GROUPS SIZE = 64 * 1024 * 1024 GRANULARITY = 64 * 1024 -class Pattern: - def __init__(self, byte, offset, size=GRANULARITY): - self.byte = byte - self.offset = offset - self.size = size - - def bits(self, granularity): - lower = self.offset // granularity - upper = (self.offset + self.size - 1) // granularity - return set(range(lower, upper + 1)) - - -class PatternGroup: - """Grouping of Pattern objects. Initialize with an iterable of Patterns.""" - def __init__(self, patterns): - self.patterns = patterns - - def bits(self, granularity): - """Calculate the unique bits dirtied by this pattern grouping""" - res = set() - for pattern in self.patterns: - res |= pattern.bits(granularity) - return res - - -GROUPS = [ - PatternGroup([ - # Batch 0: 4 clusters - Pattern('0x49', 0x0000000), - Pattern('0x6c', 0x0100000), # 1M - Pattern('0x6f', 0x2000000), # 32M - Pattern('0x76', 0x3ff0000)]), # 64M - 64K - PatternGroup([ - # Batch 1: 6 clusters (3 new) - Pattern('0x65', 0x0000000), # Full overwrite - Pattern('0x77', 0x00f8000), # Partial-left (1M-32K) - Pattern('0x72', 0x2008000), # Partial-right (32M+32K) - Pattern('0x69', 0x3fe0000)]), # Adjacent-left (64M - 128K) - PatternGroup([ - # Batch 2: 7 clusters (3 new) - Pattern('0x74', 0x0010000), # Adjacent-right - Pattern('0x69', 0x00e8000), # Partial-left (1M-96K) - Pattern('0x6e', 0x2018000), # Partial-right (32M+96K) - Pattern('0x67', 0x3fe0000, - 2*GRANULARITY)]), # Overwrite [(64M-128K)-64M) - PatternGroup([ - # Batch 3: 8 clusters (5 new) - # Carefully chosen such that nothing re-dirties the one cluster - # that copies out successfully before failure in Group #1. - Pattern('0xaa', 0x0010000, - 3*GRANULARITY), # Overwrite and 2x Adjacent-right - Pattern('0xbb', 0x00d8000), # Partial-left (1M-160K) - Pattern('0xcc', 0x2028000), # Partial-right (32M+160K) - Pattern('0xdd', 0x3fc0000)]), # New; leaving a gap to the right -] - - -class EmulatedBitmap: - def __init__(self, granularity=GRANULARITY): - self._bits = set() - self.granularity = granularity - - def dirty_bits(self, bits): - self._bits |= set(bits) - - def dirty_group(self, n): - self.dirty_bits(GROUPS[n].bits(self.granularity)) - - def clear(self): - self._bits = set() - - def clear_bits(self, bits): - self._bits -= set(bits) - - def clear_bit(self, bit): - self.clear_bits({bit}) - - def clear_group(self, n): - self.clear_bits(GROUPS[n].bits(self.granularity)) - - @property - def first_bit(self): - return sorted(self.bits)[0] - - @property - def bits(self): - return self._bits - - @property - def count(self): - return len(self.bits) - - def compare(self, qmp_bitmap): - """ - Print a nice human-readable message checking that a bitmap as reported - by the QMP interface has as many bits set as we expect it to. - """ - - name = qmp_bitmap.get('name', '(anonymous)') - log("= Checking Bitmap {:s} =".format(name)) - - want = self.count - have = qmp_bitmap['count'] // qmp_bitmap['granularity'] - - log("expecting {:d} dirty sectors; have {:d}. {:s}".format( - want, have, "OK!" if want == have else "ERROR!")) - log('') - - class Drive: """Represents, vaguely, a drive attached to a VM. Includes format, graph, and device information.""" diff --git a/tests/qemu-iotests/bitmaps.py b/tests/qemu-iotests/bitmaps.py new file mode 100644 index 0000000000..522fc25171 --- /dev/null +++ b/tests/qemu-iotests/bitmaps.py @@ -0,0 +1,131 @@ +# Bitmap-related helper utilities +# +# Copyright (c) 2020 John Snow for Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# owner=jsnow@redhat.com + +from iotests import log + +GRANULARITY = 64 * 1024 + + +class Pattern: + def __init__(self, byte, offset, size=GRANULARITY): + self.byte = byte + self.offset = offset + self.size = size + + def bits(self, granularity): + lower = self.offset // granularity + upper = (self.offset + self.size - 1) // granularity + return set(range(lower, upper + 1)) + + +class PatternGroup: + """Grouping of Pattern objects. Initialize with an iterable of Patterns.""" + def __init__(self, patterns): + self.patterns = patterns + + def bits(self, granularity): + """Calculate the unique bits dirtied by this pattern grouping""" + res = set() + for pattern in self.patterns: + res |= pattern.bits(granularity) + return res + + +GROUPS = [ + PatternGroup([ + # Batch 0: 4 clusters + Pattern('0x49', 0x0000000), + Pattern('0x6c', 0x0100000), # 1M + Pattern('0x6f', 0x2000000), # 32M + Pattern('0x76', 0x3ff0000)]), # 64M - 64K + PatternGroup([ + # Batch 1: 6 clusters (3 new) + Pattern('0x65', 0x0000000), # Full overwrite + Pattern('0x77', 0x00f8000), # Partial-left (1M-32K) + Pattern('0x72', 0x2008000), # Partial-right (32M+32K) + Pattern('0x69', 0x3fe0000)]), # Adjacent-left (64M - 128K) + PatternGroup([ + # Batch 2: 7 clusters (3 new) + Pattern('0x74', 0x0010000), # Adjacent-right + Pattern('0x69', 0x00e8000), # Partial-left (1M-96K) + Pattern('0x6e', 0x2018000), # Partial-right (32M+96K) + Pattern('0x67', 0x3fe0000, + 2*GRANULARITY)]), # Overwrite [(64M-128K)-64M) + PatternGroup([ + # Batch 3: 8 clusters (5 new) + # Carefully chosen such that nothing re-dirties the one cluster + # that copies out successfully before failure in Group #1. + Pattern('0xaa', 0x0010000, + 3*GRANULARITY), # Overwrite and 2x Adjacent-right + Pattern('0xbb', 0x00d8000), # Partial-left (1M-160K) + Pattern('0xcc', 0x2028000), # Partial-right (32M+160K) + Pattern('0xdd', 0x3fc0000)]), # New; leaving a gap to the right +] + + +class EmulatedBitmap: + def __init__(self, granularity=GRANULARITY): + self._bits = set() + self.granularity = granularity + + def dirty_bits(self, bits): + self._bits |= set(bits) + + def dirty_group(self, n): + self.dirty_bits(GROUPS[n].bits(self.granularity)) + + def clear(self): + self._bits = set() + + def clear_bits(self, bits): + self._bits -= set(bits) + + def clear_bit(self, bit): + self.clear_bits({bit}) + + def clear_group(self, n): + self.clear_bits(GROUPS[n].bits(self.granularity)) + + @property + def first_bit(self): + return sorted(self.bits)[0] + + @property + def bits(self): + return self._bits + + @property + def count(self): + return len(self.bits) + + def compare(self, qmp_bitmap): + """ + Print a nice human-readable message checking that a bitmap as reported + by the QMP interface has as many bits set as we expect it to. + """ + + name = qmp_bitmap.get('name', '(anonymous)') + log("= Checking Bitmap {:s} =".format(name)) + + want = self.count + have = qmp_bitmap['count'] // qmp_bitmap['granularity'] + + log("expecting {:d} dirty sectors; have {:d}. {:s}".format( + want, have, "OK!" if want == have else "ERROR!")) + log('') From patchwork Thu May 14 03:49:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 1289842 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=SbECq43B; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49MyJQ48pLz9sSm for ; Thu, 14 May 2020 13:51:18 +1000 (AEST) Received: from localhost ([::1]:57366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZ4tv-00017k-VL for incoming@patchwork.ozlabs.org; Wed, 13 May 2020 23:51:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZ4t7-00015R-HJ for qemu-devel@nongnu.org; Wed, 13 May 2020 23:50:25 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:33075 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jZ4sx-00007Z-Am for qemu-devel@nongnu.org; Wed, 13 May 2020 23:50:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589428214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wb+QkS2M8JcRM6Yv8F6Dm+OOgvXdDsiD3FXNvt3k4Vc=; b=SbECq43B5mtDni2fkedMNg/Eb6f/6VU2UyN9u0AhLiNnP5XzJfu7vAxn4/T0J1uCxpr53j I3FSZuQCDDVuFCn8E8jdT+ohkEx44/Py3eENxd1aUKAO6zVBKmrHTennbuLIyxsr4QPczx 7sXPcXGfvTehxPuCE3wsr+UmFACnpsw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-437-0ZcpZ7hfNeaAJx_5J3EXPg-1; Wed, 13 May 2020 23:50:12 -0400 X-MC-Unique: 0ZcpZ7hfNeaAJx_5J3EXPg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3E8C5461; Thu, 14 May 2020 03:50:11 +0000 (UTC) Received: from probe.redhat.com (ovpn-113-9.rdu2.redhat.com [10.10.113.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id C2AB176E9F; Thu, 14 May 2020 03:49:48 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH RFC v2 5/5] iotests: add 287 for block-dirty-bitmap-populate Date: Wed, 13 May 2020 23:49:22 -0400 Message-Id: <20200514034922.24834-6-jsnow@redhat.com> In-Reply-To: <20200514034922.24834-1-jsnow@redhat.com> References: <20200514034922.24834-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=jsnow@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/13 22:25:46 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , pkrempa@redhat.com, Eduardo Habkost , qemu-block@nongnu.org, John Snow , Markus Armbruster , Max Reitz , vsementsov@virtuozzo.com, Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Give block-dirty-bitmap-populate a workout. Signed-off-by: John Snow --- tests/qemu-iotests/287 | 242 ++ tests/qemu-iotests/287.out | 4544 ++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/group | 1 + 3 files changed, 4787 insertions(+) create mode 100755 tests/qemu-iotests/287 create mode 100644 tests/qemu-iotests/287.out diff --git a/tests/qemu-iotests/287 b/tests/qemu-iotests/287 new file mode 100755 index 0000000000..1faff03917 --- /dev/null +++ b/tests/qemu-iotests/287 @@ -0,0 +1,242 @@ +#!/usr/bin/env python3 +# +# Test block-dirty-bitmap-populate +# +# Copyright (c) 2020 John Snow for Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# owner=jsnow@redhat.com + +from collections import namedtuple +import itertools +import math +import os + +import iotests +from iotests import log, qemu_img +from bitmaps import EmulatedBitmap, GROUPS + +SIZE = 64 * 1024 * 1024 +GRANULARITY = 64 * 1024 + + +class Drive: + def __init__(self, path, vm): + self.path = path + self.vm = vm + self.fmt = None + self.size = None + self.node = None + + def img_create(self, fmt, size): + self.fmt = fmt + self.size = size + iotests.qemu_img_create('-f', self.fmt, self.path, str(self.size)) + + +def block_dirty_bitmap_populate(vm, node, bitmap, job_id, pattern, **kwargs): + # Strip any arguments explicitly nulled by the caller: + kwargs = {key: val for key, val in kwargs.items() if val is not None} + result = vm.qmp_log('block-dirty-bitmap-populate', + node=node, + name=bitmap, + job_id=job_id, + pattern=pattern, + **kwargs) + return result + + +def populate(drive, bitmap, job_id, pattern='allocation-top', **kwargs): + kwargs.setdefault('pattern', pattern) + kwargs.setdefault('auto-finalize', False) + kwargs.setdefault('auto-dismiss', False) + ret = block_dirty_bitmap_populate(drive.vm, drive.node, + bitmap, job_id, **kwargs) + return { + 'id': job_id, + 'auto-finalize': kwargs['auto-finalize'], + 'auto-dismiss': kwargs['auto-dismiss'], + 'return': ret, + } + + +def perform_writes(drive, n, filter_node_name=None): + log("-- Write #{:d}:".format(n)) + node_name = filter_node_name or drive.node + for pattern in GROUPS[n].patterns: + cmd = "write -P{:s} 0x{:07x} 0x{:x}".format( + pattern.byte, + pattern.offset, + pattern.size) + drive.vm.hmp_qemu_io(node_name, cmd, use_log=True) + log('') + + +TestConfig = namedtuple('TestConfig', [ + 'base_pattern', + 'disabled', + 'pre_writes', + 'mid_writes', + 'cancel', + 'post_writes', +]) + + +def test_bitmap_populate(config): + """ + Test bitmap populate. + + :param base_pattern: Write a base pattern? + :param disabled: Disable the target bitmap? + :param pre_writes: Write a pattern after bitmap creation, but before job? + :param mid_writes: Write a pattern before job finalizes? + :param cancel: Cancel the job instead of finalizing it? + :param post_writes: Write a pattern after the job? + """ + with iotests.FilePaths(['img']) as (img_path,), iotests.VM() as vm: + log("\n=== Bitmap Populate {:s} ===\n".format(str(config))) + + log('-- Prepare image & VM:') + drive0 = Drive(img_path, vm=vm) + drive0.img_create(iotests.imgfmt, SIZE) + vm.add_device("{},id=scsi0".format(iotests.get_virtio_scsi_device())) + vm.launch() + + file_config = { + 'driver': 'file', + 'filename': drive0.path + } + + drive0.node = 'drive0' + vm.qmp_log('blockdev-add', + filters=[iotests.filter_qmp_testfiles], + node_name=drive0.node, + driver=drive0.fmt, + file=file_config) + log('') + + + # Step 0: Prepare & Base Allocation Pattern + + if config.base_pattern: + perform_writes(drive0, 0) + + + # Step 1: Add test bitmap + + log('-- Add Bitmap:') + vm.qmp_log('block-dirty-bitmap-add', + node=drive0.node, + name="target", + granularity=GRANULARITY, + disabled=config.disabled) + ebitmap = EmulatedBitmap() + log('') + + # Step 2: Pre-Writes + + if config.pre_writes: + perform_writes(drive0, 1) + if not config.disabled: + ebitmap.dirty_group(1) + bitmap = vm.get_bitmap(drive0.node, 'target') + ebitmap.compare(bitmap) + + + # Step 3: Launch job & Mid-Writes + + log('-- Test block-dirty-bitmap-populate (bitpop0):') + def pre_finalize(): + # Writes issued prior to job finalization: + if config.mid_writes: + perform_writes(drive0, 2) + if not config.disabled: + ebitmap.dirty_group(2) + + + class TestJobRunner(iotests.JobRunner): + def on_pending(self, event): + if config.mid_writes: + perform_writes(drive0, 2) + if not config.disabled: + ebitmap.dirty_group(2) + super().on_pending(event) + + job = populate(drive0, 'target', 'bitpop0') + assert job['return'] == {'return': {}} + job_runner = TestJobRunner(vm, job['id'], + auto_dismiss=job['auto-dismiss'], + auto_finalize=job['auto-finalize'], + cancel=config.cancel) + job_runner.run() + log('') + + + # Step 4: Post-job verification + + if not config.cancel: + # Any writes made prior to the job finishing should now be visible. + if config.base_pattern: + ebitmap.dirty_group(0) + if config.pre_writes: + ebitmap.dirty_group(1) + if config.mid_writes: + ebitmap.dirty_group(2) + + bitmap = vm.get_bitmap(drive0.node, 'target') + ebitmap.compare(bitmap) + + + # Step 5: Post-Writes + + if config.post_writes: + perform_writes(drive0, 3) + if not config.disabled: + ebitmap.dirty_group(3) + + + # Step 6: Final Verification + + log('-- Verification:') + bitmaps = vm.query_bitmaps() + log({'bitmaps': bitmaps}, indent=2) + log('') + bitmap = vm.get_bitmap(drive0.node, 'target', bitmaps=bitmaps) + ebitmap.compare(bitmap) + + + log('-- Cleanup:') + vm.qmp_log("block-dirty-bitmap-remove", + node=drive0.node, name="target") + + bitmaps = vm.query_bitmaps() + if bitmaps: + log("ERROR: bitmaps unaccounted for:") + log(bitmaps) + else: + log('OK: All bitmaps removed') + vm.shutdown() + log('') + + +def main(): + for args in itertools.product((True, False), repeat=6): + cfg = TestConfig(*args) + test_bitmap_populate(cfg) + + +if __name__ == '__main__': + iotests.script_main(main, supported_fmts=['qcow2'], + supported_protocols=['file']) diff --git a/tests/qemu-iotests/287.out b/tests/qemu-iotests/287.out new file mode 100644 index 0000000000..7c0afc7192 --- /dev/null +++ b/tests/qemu-iotests/287.out @@ -0,0 +1,4544 @@ + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=True, mid_writes=True, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=True, mid_writes=True, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=True, mid_writes=True, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 655360, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=True, mid_writes=True, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 655360, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=True, mid_writes=False, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=True, mid_writes=False, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=True, mid_writes=False, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 458752, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=True, mid_writes=False, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 458752, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=False, mid_writes=True, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=False, mid_writes=True, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=False, mid_writes=True, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 655360, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=False, mid_writes=True, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 655360, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=False, mid_writes=False, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=False, mid_writes=False, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=False, mid_writes=False, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 4 dirty sectors; have 4. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 262144, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 4 dirty sectors; have 4. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=True, pre_writes=False, mid_writes=False, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 4 dirty sectors; have 4. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 262144, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 4 dirty sectors; have 4. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=True, mid_writes=True, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 983040, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 15 dirty sectors; have 15. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=True, mid_writes=True, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 655360, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=True, mid_writes=True, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 983040, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 15 dirty sectors; have 15. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=True, mid_writes=True, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 655360, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=True, mid_writes=False, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 917504, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 14 dirty sectors; have 14. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=True, mid_writes=False, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 393216, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=True, mid_writes=False, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 983040, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 15 dirty sectors; have 15. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=True, mid_writes=False, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 458752, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=False, mid_writes=True, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 786432, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 12 dirty sectors; have 12. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=False, mid_writes=True, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 458752, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=False, mid_writes=True, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 983040, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 15 dirty sectors; have 15. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=False, mid_writes=True, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 655360, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=False, mid_writes=False, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 524288, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 8 dirty sectors; have 8. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=False, mid_writes=False, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=False, mid_writes=False, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 4 dirty sectors; have 4. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 786432, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 12 dirty sectors; have 12. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=True, disabled=False, pre_writes=False, mid_writes=False, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Write #0: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x49 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6c 0x0100000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6f 0x2000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x76 0x3ff0000 0x10000\""}} +{"return": ""} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 4 dirty sectors; have 4. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 262144, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 4 dirty sectors; have 4. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=True, mid_writes=True, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=True, mid_writes=True, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=True, mid_writes=True, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 655360, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=True, mid_writes=True, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 655360, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=True, mid_writes=False, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=True, mid_writes=False, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=True, mid_writes=False, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 393216, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=True, mid_writes=False, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 393216, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=False, mid_writes=True, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=False, mid_writes=True, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=False, mid_writes=True, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 458752, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=False, mid_writes=True, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 458752, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=False, mid_writes=False, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=False, mid_writes=False, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=False, mid_writes=False, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=True, pre_writes=False, mid_writes=False, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": false, + "status": "disabled" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=True, mid_writes=True, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 983040, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 15 dirty sectors; have 15. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=True, mid_writes=True, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 655360, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=True, mid_writes=True, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 983040, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 15 dirty sectors; have 15. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=True, mid_writes=True, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 655360, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 10 dirty sectors; have 10. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=True, mid_writes=False, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 917504, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 14 dirty sectors; have 14. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=True, mid_writes=False, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 393216, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=True, mid_writes=False, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 917504, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 14 dirty sectors; have 14. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=True, mid_writes=False, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Write #1: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x65 0x0000000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x77 0x00f8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x72 0x2008000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x3fe0000 0x10000\""}} +{"return": ""} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 393216, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 6 dirty sectors; have 6. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=False, mid_writes=True, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 786432, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 12 dirty sectors; have 12. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=False, mid_writes=True, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 458752, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=False, mid_writes=True, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 786432, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 12 dirty sectors; have 12. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=False, mid_writes=True, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +-- Write #2: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x74 0x0010000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x69 0x00e8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x6e 0x2018000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0x67 0x3fe0000 0x20000\""}} +{"return": ""} + +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 458752, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 7 dirty sectors; have 7. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=False, mid_writes=False, cancel=True, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 524288, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 8 dirty sectors; have 8. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=False, mid_writes=False, cancel=True, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-cancel", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +Job failed: Operation canceled +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=False, mid_writes=False, cancel=False, post_writes=True) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Write #3: +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xaa 0x0010000 0x30000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xbb 0x00d8000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xcc 0x2028000 0x10000\""}} +{"return": ""} +{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io drive0 \"write -P0xdd 0x3fc0000 0x10000\""}} +{"return": ""} + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 524288, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 8 dirty sectors; have 8. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + + +=== Bitmap Populate TestConfig(base_pattern=False, disabled=False, pre_writes=False, mid_writes=False, cancel=False, post_writes=False) === + +-- Prepare image & VM: +{"execute": "blockdev-add", "arguments": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-img"}, "node-name": "drive0"}} +{"return": {}} + +-- Add Bitmap: +{"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name": "target", "node": "drive0"}} +{"return": {}} + +-- Test block-dirty-bitmap-populate (bitpop0): +{"execute": "block-dirty-bitmap-populate", "arguments": {"auto-dismiss": false, "auto-finalize": false, "job-id": "bitpop0", "name": "target", "node": "drive0", "pattern": "allocation-top"}} +{"return": {}} +{"execute": "job-finalize", "arguments": {"id": "bitpop0"}} +{"return": {}} +{"data": {"id": "bitpop0", "type": "bitmap-populate"}, "event": "BLOCK_JOB_PENDING", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"data": {"device": "bitpop0", "len": 67108864, "offset": 67108864, "speed": 0, "type": "bitmap-populate"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "job-dismiss", "arguments": {"id": "bitpop0"}} +{"return": {}} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Verification: +{ + "bitmaps": { + "drive0": [ + { + "busy": false, + "count": 0, + "granularity": 65536, + "name": "target", + "persistent": false, + "recording": true, + "status": "active" + } + ] + } +} + += Checking Bitmap target = +expecting 0 dirty sectors; have 0. OK! + +-- Cleanup: +{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "target", "node": "drive0"}} +{"return": {}} +OK: All bitmaps removed + diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group index fe649c5b73..122ab02d08 100644 --- a/tests/qemu-iotests/group +++ b/tests/qemu-iotests/group @@ -295,6 +295,7 @@ 283 auto quick 284 rw 286 rw quick +287 rw 288 quick 289 rw quick 290 rw auto quick