From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: mreitz@redhat.com, kwolf@redhat.com
Subject: [Qemu-devel] [PATCH] block/qcow2: save dirty_bitmaps_loaded during reopen
Date: Fri, 8 Jun 2018 15:32:08 +0300 [thread overview]
Message-ID: <20180608123208.54033-1-vsementsov@virtuozzo.com> (raw)
This variable was introduced to handle reopens. We need it on the
following qcow2_do_open, to don't try load bitmaps again.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
block/qcow2.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/qcow2.c b/block/qcow2.c
index 549fee9b69..29f7eab576 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -2178,6 +2178,7 @@ static void coroutine_fn qcow2_co_invalidate_cache(BlockDriverState *bs,
QDict *options;
Error *local_err = NULL;
int ret;
+ bool dirty_bitmaps_loaded = s->dirty_bitmaps_loaded;
/*
* Backing files are read-only which makes all of their metadata immutable,
@@ -2190,6 +2191,7 @@ static void coroutine_fn qcow2_co_invalidate_cache(BlockDriverState *bs,
qcow2_close(bs);
memset(s, 0, sizeof(BDRVQcow2State));
+ s->dirty_bitmaps_loaded = dirty_bitmaps_loaded;
options = qdict_clone_shallow(bs->options);
flags &= ~BDRV_O_INACTIVE;
--
2.11.1
next reply other threads:[~2018-06-08 12:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-08 12:32 Vladimir Sementsov-Ogievskiy [this message]
2018-06-08 15:33 ` [Qemu-devel] [PATCH] block/qcow2: save dirty_bitmaps_loaded during reopen Vladimir Sementsov-Ogievskiy
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=20180608123208.54033-1-vsementsov@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).