From nobody Tue Nov 18 22:49:07 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612807425; cv=none; d=zohomail.com; s=zohoarc; b=m7pkUSsNOHYbwvzPcT94icFht6UWANMq4S113kcZwKGDrTeFdmTglfINzdYnY2xwTM1jSdlF8uOv4bg6wZtuk92QY/aumAjIiEL9AIXXmWhXJQ69YQQFXDGkGAqp8GKoWWDk21qL+CyRkiJ6FmtY9A5oINQdW3G6NhpkWQJ5gQo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612807425; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=95YWl6BHPqbbaiKSP4iONeoXerjI8f1E4zl5Ow0Ooy4=; b=bsMGLjKjc2jEIM6f5m4nJQtfYzcKRIztNP27a0tMu3D5RyEqJGwBRQ4mVbiSMTfTS6LHBcUsiimMOHPeyIGIvY6rYdbQ+uHVqjPDlQMpKDfi+W5FMwryfGF0LzHCULjnklIveNvjQ/ZTAtLT73w1pog70mbeqWSCS2r+O06Js1o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612807425753450.2106820760491; Mon, 8 Feb 2021 10:03:45 -0800 (PST) Received: from localhost ([::1]:45758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9Asy-0004Mb-E0 for importer@patchew.org; Mon, 08 Feb 2021 13:03:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l94l1-000227-3K for qemu-devel@nongnu.org; Mon, 08 Feb 2021 06:31:11 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:35428) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l94kh-0002TR-Vp for qemu-devel@nongnu.org; Mon, 08 Feb 2021 06:31:02 -0500 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-43-WZzCaX_YMIyjtoNDfewLQA-1; Mon, 08 Feb 2021 06:30:41 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 93D36192AB7A; Mon, 8 Feb 2021 11:30:40 +0000 (UTC) Received: from dgilbert-t580.localhost (ovpn-115-22.ams2.redhat.com [10.36.115.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id B47481002393; Mon, 8 Feb 2021 11:30:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612783844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=95YWl6BHPqbbaiKSP4iONeoXerjI8f1E4zl5Ow0Ooy4=; b=DcFdXsfHFboogwTOwz4Yr2Qf1BG6TNk0XdhG0G1BdBPIUkFnoTqYPo12iEeqmYN7fg6XJJ h0hYulyNAZeDGTieQxlzhFdi0qMxQUNbNf9pPtGXOYB/AcaB4A/T3QJS8jz71ozjfK6wG8 TJZLUp42Us2ABt2XAEoAw3JwV9FOrrU= X-MC-Unique: WZzCaX_YMIyjtoNDfewLQA-1 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, andrey.gruzdev@virtuozzo.com, berrange@redhat.com, gaojinhao@huawei.com, armbru@redhat.com, mst@redhat.com, philmd@redhat.com, wainersm@redhat.com, s.reiter@proxmox.com Subject: [PULL 18/27] block: add ability to specify list of blockdevs during snapshot Date: Mon, 8 Feb 2021 11:29:09 +0000 Message-Id: <20210208112918.185058-19-dgilbert@redhat.com> In-Reply-To: <20210208112918.185058-1-dgilbert@redhat.com> References: <20210208112918.185058-1-dgilbert@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dgilbert@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.569, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) From: Daniel P. Berrang=C3=A9 When running snapshot operations, there are various rules for which blockdevs are included/excluded. While this provides reasonable default behaviour, there are scenarios that are not well handled by the default logic. Some of the conditions do not have a single correct answer. Thus there needs to be a way for the mgmt app to provide an explicit list of blockdevs to perform snapshots across. This can be achieved by passing a list of node names that should be used. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrang=C3=A9 Message-Id: <20210204124834.774401-5-berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- block/monitor/block-hmp-cmds.c | 4 +- block/snapshot.c | 172 ++++++++++++++++++++++++--------- include/block/snapshot.h | 22 +++-- migration/savevm.c | 18 ++-- monitor/hmp-cmds.c | 2 +- replay/replay-debugging.c | 4 +- 6 files changed, 159 insertions(+), 63 deletions(-) diff --git a/block/monitor/block-hmp-cmds.c b/block/monitor/block-hmp-cmds.c index 9532d085ea..e15121be1f 100644 --- a/block/monitor/block-hmp-cmds.c +++ b/block/monitor/block-hmp-cmds.c @@ -902,7 +902,7 @@ void hmp_info_snapshots(Monitor *mon, const QDict *qdic= t) SnapshotEntry *snapshot_entry; Error *err =3D NULL; =20 - bs =3D bdrv_all_find_vmstate_bs(&err); + bs =3D bdrv_all_find_vmstate_bs(false, NULL, &err); if (!bs) { error_report_err(err); return; @@ -954,7 +954,7 @@ void hmp_info_snapshots(Monitor *mon, const QDict *qdic= t) total =3D 0; for (i =3D 0; i < nb_sns; i++) { SnapshotEntry *next_sn; - if (bdrv_all_find_snapshot(sn_tab[i].name, NULL) =3D=3D 0) { + if (bdrv_all_find_snapshot(sn_tab[i].name, false, NULL, NULL) =3D= =3D 0) { global_snapshots[total] =3D i; total++; QTAILQ_FOREACH(image_entry, &image_list, next) { diff --git a/block/snapshot.c b/block/snapshot.c index 482e3fc7b7..220173deae 100644 --- a/block/snapshot.c +++ b/block/snapshot.c @@ -447,6 +447,41 @@ int bdrv_snapshot_load_tmp_by_id_or_name(BlockDriverSt= ate *bs, return ret; } =20 + +static int bdrv_all_get_snapshot_devices(bool has_devices, strList *device= s, + GList **all_bdrvs, + Error **errp) +{ + g_autoptr(GList) bdrvs =3D NULL; + + if (has_devices) { + if (!devices) { + error_setg(errp, "At least one device is required for snapshot= "); + return -1; + } + + while (devices) { + BlockDriverState *bs =3D bdrv_find_node(devices->value); + if (!bs) { + error_setg(errp, "No block device node '%s'", devices->val= ue); + return -1; + } + bdrvs =3D g_list_append(bdrvs, bs); + devices =3D devices->next; + } + } else { + BlockDriverState *bs; + BdrvNextIterator it; + for (bs =3D bdrv_first(&it); bs; bs =3D bdrv_next(&it)) { + bdrvs =3D g_list_append(bdrvs, bs); + } + } + + *all_bdrvs =3D g_steal_pointer(&bdrvs); + return 0; +} + + static bool bdrv_all_snapshots_includes_bs(BlockDriverState *bs) { if (!bdrv_is_inserted(bs) || bdrv_is_read_only(bs)) { @@ -462,43 +497,59 @@ static bool bdrv_all_snapshots_includes_bs(BlockDrive= rState *bs) * These functions will properly handle dataplane (take aio_context_acquire * when appropriate for appropriate block drivers) */ =20 -bool bdrv_all_can_snapshot(Error **errp) +bool bdrv_all_can_snapshot(bool has_devices, strList *devices, + Error **errp) { - BlockDriverState *bs; - BdrvNextIterator it; + g_autoptr(GList) bdrvs =3D NULL; + GList *iterbdrvs; =20 - for (bs =3D bdrv_first(&it); bs; bs =3D bdrv_next(&it)) { + if (bdrv_all_get_snapshot_devices(has_devices, devices, &bdrvs, errp) = < 0) { + return false; + } + + iterbdrvs =3D bdrvs; + while (iterbdrvs) { + BlockDriverState *bs =3D iterbdrvs->data; AioContext *ctx =3D bdrv_get_aio_context(bs); bool ok =3D true; =20 aio_context_acquire(ctx); - if (bdrv_all_snapshots_includes_bs(bs)) { + if (devices || bdrv_all_snapshots_includes_bs(bs)) { ok =3D bdrv_can_snapshot(bs); } aio_context_release(ctx); if (!ok) { error_setg(errp, "Device '%s' is writable but does not support= " "snapshots", bdrv_get_device_or_node_name(bs)); - bdrv_next_cleanup(&it); return false; } + + iterbdrvs =3D iterbdrvs->next; } =20 return true; } =20 -int bdrv_all_delete_snapshot(const char *name, Error **errp) +int bdrv_all_delete_snapshot(const char *name, + bool has_devices, strList *devices, + Error **errp) { - BlockDriverState *bs; - BdrvNextIterator it; - QEMUSnapshotInfo sn1, *snapshot =3D &sn1; + g_autoptr(GList) bdrvs =3D NULL; + GList *iterbdrvs; + + if (bdrv_all_get_snapshot_devices(has_devices, devices, &bdrvs, errp) = < 0) { + return -1; + } =20 - for (bs =3D bdrv_first(&it); bs; bs =3D bdrv_next(&it)) { + iterbdrvs =3D bdrvs; + while (iterbdrvs) { + BlockDriverState *bs =3D iterbdrvs->data; AioContext *ctx =3D bdrv_get_aio_context(bs); + QEMUSnapshotInfo sn1, *snapshot =3D &sn1; int ret =3D 0; =20 aio_context_acquire(ctx); - if (bdrv_all_snapshots_includes_bs(bs) && + if ((devices || bdrv_all_snapshots_includes_bs(bs)) && bdrv_snapshot_find(bs, snapshot, name) >=3D 0) { ret =3D bdrv_snapshot_delete(bs, snapshot->id_str, @@ -508,61 +559,80 @@ int bdrv_all_delete_snapshot(const char *name, Error = **errp) if (ret < 0) { error_prepend(errp, "Could not delete snapshot '%s' on '%s': ", name, bdrv_get_device_or_node_name(bs)); - bdrv_next_cleanup(&it); return -1; } + + iterbdrvs =3D iterbdrvs->next; } =20 return 0; } =20 =20 -int bdrv_all_goto_snapshot(const char *name, Error **errp) +int bdrv_all_goto_snapshot(const char *name, + bool has_devices, strList *devices, + Error **errp) { - BlockDriverState *bs; - BdrvNextIterator it; + g_autoptr(GList) bdrvs =3D NULL; + GList *iterbdrvs; =20 - for (bs =3D bdrv_first(&it); bs; bs =3D bdrv_next(&it)) { + if (bdrv_all_get_snapshot_devices(has_devices, devices, &bdrvs, errp) = < 0) { + return -1; + } + + iterbdrvs =3D bdrvs; + while (iterbdrvs) { + BlockDriverState *bs =3D iterbdrvs->data; AioContext *ctx =3D bdrv_get_aio_context(bs); int ret =3D 0; =20 aio_context_acquire(ctx); - if (bdrv_all_snapshots_includes_bs(bs)) { + if (devices || bdrv_all_snapshots_includes_bs(bs)) { ret =3D bdrv_snapshot_goto(bs, name, errp); } aio_context_release(ctx); if (ret < 0) { error_prepend(errp, "Could not load snapshot '%s' on '%s': ", name, bdrv_get_device_or_node_name(bs)); - bdrv_next_cleanup(&it); return -1; } + + iterbdrvs =3D iterbdrvs->next; } =20 return 0; } =20 -int bdrv_all_find_snapshot(const char *name, Error **errp) +int bdrv_all_find_snapshot(const char *name, + bool has_devices, strList *devices, + Error **errp) { - QEMUSnapshotInfo sn; - BlockDriverState *bs; - BdrvNextIterator it; + g_autoptr(GList) bdrvs =3D NULL; + GList *iterbdrvs; + + if (bdrv_all_get_snapshot_devices(has_devices, devices, &bdrvs, errp) = < 0) { + return -1; + } =20 - for (bs =3D bdrv_first(&it); bs; bs =3D bdrv_next(&it)) { + iterbdrvs =3D bdrvs; + while (iterbdrvs) { + BlockDriverState *bs =3D iterbdrvs->data; AioContext *ctx =3D bdrv_get_aio_context(bs); + QEMUSnapshotInfo sn; int ret =3D 0; =20 aio_context_acquire(ctx); - if (bdrv_all_snapshots_includes_bs(bs)) { + if (devices || bdrv_all_snapshots_includes_bs(bs)) { ret =3D bdrv_snapshot_find(bs, &sn, name); } aio_context_release(ctx); if (ret < 0) { error_setg(errp, "Could not find snapshot '%s' on '%s'", name, bdrv_get_device_or_node_name(bs)); - bdrv_next_cleanup(&it); return -1; } + + iterbdrvs =3D iterbdrvs->next; } =20 return 0; @@ -571,12 +641,19 @@ int bdrv_all_find_snapshot(const char *name, Error **= errp) int bdrv_all_create_snapshot(QEMUSnapshotInfo *sn, BlockDriverState *vm_state_bs, uint64_t vm_state_size, + bool has_devices, strList *devices, Error **errp) { - BlockDriverState *bs; - BdrvNextIterator it; + g_autoptr(GList) bdrvs =3D NULL; + GList *iterbdrvs; + + if (bdrv_all_get_snapshot_devices(has_devices, devices, &bdrvs, errp) = < 0) { + return -1; + } =20 - for (bs =3D bdrv_first(&it); bs; bs =3D bdrv_next(&it)) { + iterbdrvs =3D bdrvs; + while (iterbdrvs) { + BlockDriverState *bs =3D iterbdrvs->data; AioContext *ctx =3D bdrv_get_aio_context(bs); int ret =3D 0; =20 @@ -584,7 +661,7 @@ int bdrv_all_create_snapshot(QEMUSnapshotInfo *sn, if (bs =3D=3D vm_state_bs) { sn->vm_state_size =3D vm_state_size; ret =3D bdrv_snapshot_create(bs, sn); - } else if (bdrv_all_snapshots_includes_bs(bs)) { + } else if (devices || bdrv_all_snapshots_includes_bs(bs)) { sn->vm_state_size =3D 0; ret =3D bdrv_snapshot_create(bs, sn); } @@ -592,34 +669,43 @@ int bdrv_all_create_snapshot(QEMUSnapshotInfo *sn, if (ret < 0) { error_setg(errp, "Could not create snapshot '%s' on '%s'", sn->name, bdrv_get_device_or_node_name(bs)); - bdrv_next_cleanup(&it); return -1; } + + iterbdrvs =3D iterbdrvs->next; } =20 return 0; } =20 -BlockDriverState *bdrv_all_find_vmstate_bs(Error **errp) +BlockDriverState *bdrv_all_find_vmstate_bs(bool has_devices, strList *devi= ces, + Error **errp) { - BlockDriverState *bs; - BdrvNextIterator it; + g_autoptr(GList) bdrvs =3D NULL; + GList *iterbdrvs; =20 - for (bs =3D bdrv_first(&it); bs; bs =3D bdrv_next(&it)) { + if (bdrv_all_get_snapshot_devices(has_devices, devices, &bdrvs, errp) = < 0) { + return NULL; + } + + iterbdrvs =3D bdrvs; + while (iterbdrvs) { + BlockDriverState *bs =3D iterbdrvs->data; AioContext *ctx =3D bdrv_get_aio_context(bs); - bool found; + bool found =3D false; =20 aio_context_acquire(ctx); - found =3D bdrv_all_snapshots_includes_bs(bs) && bdrv_can_snapshot(= bs); + found =3D (devices || bdrv_all_snapshots_includes_bs(bs)) && + bdrv_can_snapshot(bs); aio_context_release(ctx); =20 if (found) { - bdrv_next_cleanup(&it); - break; + return bs; } + + iterbdrvs =3D iterbdrvs->next; } - if (!bs) { - error_setg(errp, "No block device supports snapshots"); - } - return bs; + + error_setg(errp, "No block device supports snapshots"); + return NULL; } diff --git a/include/block/snapshot.h b/include/block/snapshot.h index 5cb2b696ad..2569a903f2 100644 --- a/include/block/snapshot.h +++ b/include/block/snapshot.h @@ -25,7 +25,7 @@ #ifndef SNAPSHOT_H #define SNAPSHOT_H =20 - +#include "qapi/qapi-builtin-types.h" =20 #define SNAPSHOT_OPT_BASE "snapshot." #define SNAPSHOT_OPT_ID "snapshot.id" @@ -77,15 +77,25 @@ int bdrv_snapshot_load_tmp_by_id_or_name(BlockDriverSta= te *bs, * These functions will properly handle dataplane (take aio_context_acquire * when appropriate for appropriate block drivers */ =20 -bool bdrv_all_can_snapshot(Error **errp); -int bdrv_all_delete_snapshot(const char *name, Error **errp); -int bdrv_all_goto_snapshot(const char *name, Error **errp); -int bdrv_all_find_snapshot(const char *name, Error **errp); +bool bdrv_all_can_snapshot(bool has_devices, strList *devices, + Error **errp); +int bdrv_all_delete_snapshot(const char *name, + bool has_devices, strList *devices, + Error **errp); +int bdrv_all_goto_snapshot(const char *name, + bool has_devices, strList *devices, + Error **errp); +int bdrv_all_find_snapshot(const char *name, + bool has_devices, strList *devices, + Error **errp); int bdrv_all_create_snapshot(QEMUSnapshotInfo *sn, BlockDriverState *vm_state_bs, uint64_t vm_state_size, + bool has_devices, + strList *devices, Error **errp); =20 -BlockDriverState *bdrv_all_find_vmstate_bs(Error **errp); +BlockDriverState *bdrv_all_find_vmstate_bs(bool has_devices, strList *devi= ces, + Error **errp); =20 #endif diff --git a/migration/savevm.c b/migration/savevm.c index b85eefd682..0dbe8c1607 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2786,18 +2786,18 @@ bool save_snapshot(const char *name, Error **errp) return false; } =20 - if (!bdrv_all_can_snapshot(errp)) { + if (!bdrv_all_can_snapshot(false, NULL, errp)) { return false; } =20 /* Delete old snapshots of the same name */ if (name) { - if (bdrv_all_delete_snapshot(name, errp) < 0) { + if (bdrv_all_delete_snapshot(name, false, NULL, errp) < 0) { return false; } } =20 - bs =3D bdrv_all_find_vmstate_bs(errp); + bs =3D bdrv_all_find_vmstate_bs(false, NULL, errp); if (bs =3D=3D NULL) { return false; } @@ -2862,9 +2862,9 @@ bool save_snapshot(const char *name, Error **errp) aio_context_release(aio_context); aio_context =3D NULL; =20 - ret =3D bdrv_all_create_snapshot(sn, bs, vm_state_size, errp); + ret =3D bdrv_all_create_snapshot(sn, bs, vm_state_size, false, NULL, e= rrp); if (ret < 0) { - bdrv_all_delete_snapshot(sn->name, NULL); + bdrv_all_delete_snapshot(sn->name, false, NULL, NULL); goto the_end; } =20 @@ -2974,15 +2974,15 @@ bool load_snapshot(const char *name, Error **errp) AioContext *aio_context; MigrationIncomingState *mis =3D migration_incoming_get_current(); =20 - if (!bdrv_all_can_snapshot(errp)) { + if (!bdrv_all_can_snapshot(false, NULL, errp)) { return false; } - ret =3D bdrv_all_find_snapshot(name, errp); + ret =3D bdrv_all_find_snapshot(name, false, NULL, errp); if (ret < 0) { return false; } =20 - bs_vm_state =3D bdrv_all_find_vmstate_bs(errp); + bs_vm_state =3D bdrv_all_find_vmstate_bs(false, NULL, errp); if (!bs_vm_state) { return false; } @@ -3009,7 +3009,7 @@ bool load_snapshot(const char *name, Error **errp) /* Flush all IO requests so they don't interfere with the new state. = */ bdrv_drain_all_begin(); =20 - ret =3D bdrv_all_goto_snapshot(name, errp); + ret =3D bdrv_all_goto_snapshot(name, false, NULL, errp); if (ret < 0) { goto err_drain; } diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 6ff050ac3d..f795261f77 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -1158,7 +1158,7 @@ void hmp_delvm(Monitor *mon, const QDict *qdict) Error *err =3D NULL; const char *name =3D qdict_get_str(qdict, "name"); =20 - bdrv_all_delete_snapshot(name, &err); + bdrv_all_delete_snapshot(name, false, NULL, &err); hmp_handle_error(mon, err); } =20 diff --git a/replay/replay-debugging.c b/replay/replay-debugging.c index 8e0050915d..67d8237077 100644 --- a/replay/replay-debugging.c +++ b/replay/replay-debugging.c @@ -148,7 +148,7 @@ static char *replay_find_nearest_snapshot(int64_t icoun= t, =20 *snapshot_icount =3D -1; =20 - bs =3D bdrv_all_find_vmstate_bs(NULL); + bs =3D bdrv_all_find_vmstate_bs(false, NULL, NULL); if (!bs) { goto fail; } @@ -159,7 +159,7 @@ static char *replay_find_nearest_snapshot(int64_t icoun= t, aio_context_release(aio_context); =20 for (i =3D 0; i < nb_sns; i++) { - if (bdrv_all_find_snapshot(sn_tab[i].name, NULL) =3D=3D 0) { + if (bdrv_all_find_snapshot(sn_tab[i].name, false, NULL, NULL) =3D= =3D 0) { if (sn_tab[i].icount !=3D -1ULL && sn_tab[i].icount <=3D icount && (!nearest || nearest->icount < sn_tab[i].icount)) { --=20 2.29.2