All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org
Subject: [PULL 03/15] replay: disable default snapshot for record/replay
Date: Mon, 14 Oct 2019 18:03:37 +0200	[thread overview]
Message-ID: <20191014160343.8211-4-kwolf@redhat.com> (raw)
In-Reply-To: <20191014160343.8211-1-kwolf@redhat.com>

From: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>

This patch disables setting '-snapshot' option on by default
in record/replay mode. This is needed for creating vmstates in record
and replay modes.

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Acked-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 vl.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/vl.c b/vl.c
index 0a295e5d77..fce9ce2364 100644
--- a/vl.c
+++ b/vl.c
@@ -1203,7 +1203,7 @@ static void configure_blockdev(BlockdevOptionsQueue *bdo_queue,
         qapi_free_BlockdevOptions(bdo->bdo);
         g_free(bdo);
     }
-    if (snapshot || replay_mode != REPLAY_MODE_NONE) {
+    if (snapshot) {
         qemu_opts_foreach(qemu_find_opts("drive"), drive_enable_snapshot,
                           NULL, NULL);
     }
@@ -3066,7 +3066,13 @@ int main(int argc, char **argv, char **envp)
                 drive_add(IF_PFLASH, -1, optarg, PFLASH_OPTS);
                 break;
             case QEMU_OPTION_snapshot:
-                snapshot = 1;
+                {
+                    Error *blocker = NULL;
+                    snapshot = 1;
+                    error_setg(&blocker, QERR_REPLAY_NOT_SUPPORTED,
+                               "-snapshot");
+                    replay_add_blocker(blocker);
+                }
                 break;
             case QEMU_OPTION_numa:
                 opts = qemu_opts_parse_noisily(qemu_find_opts("numa"),
-- 
2.20.1



  parent reply	other threads:[~2019-10-14 16:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 16:03 [PULL 00/15] Block layer patches Kevin Wolf
2019-10-14 16:03 ` [PULL 01/15] block/vhdx: add check for truncated image files Kevin Wolf
2019-10-14 16:03 ` [PULL 02/15] block: implement bdrv_snapshot_goto for blkreplay Kevin Wolf
2019-10-14 16:03 ` Kevin Wolf [this message]
2019-10-14 16:03 ` [PULL 04/15] replay: update docs for record/replay with block devices Kevin Wolf
2019-10-14 16:03 ` [PULL 05/15] replay: don't drain/flush bdrv queue while RR is working Kevin Wolf
2019-10-14 16:03 ` [PULL 06/15] replay: finish record/replay before closing the disks Kevin Wolf
2019-10-14 16:03 ` [PULL 07/15] replay: add BH oneshot event for block layer Kevin Wolf
2019-10-14 16:03 ` [PULL 08/15] block: Reject misaligned write requests with BDRV_REQ_NO_FALLBACK Kevin Wolf
2019-10-14 16:03 ` [PULL 09/15] iotests/028: Fix for long $TEST_DIRs Kevin Wolf
2019-10-15 16:09 ` [PULL 00/15] Block layer patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191014160343.8211-4-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.