From: John Snow <jsnow@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, vsementsov@virtuozzo.com,
John Snow <jsnow@redhat.com>,
qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] block: Change bitmap truncate conditional to assertion
Date: Wed, 10 Jun 2015 13:24:54 -0400 [thread overview]
Message-ID: <1433957094-8303-1-git-send-email-jsnow@redhat.com> (raw)
Requires: 1433796555-5608-1-git-send-email-jsnow@redhat.com
[PATCH] block: record new size in bdrv_dirty_bitmap_truncate
This is an artifact of an older version that had both all-bitmap and
single-bitmap truncate functions, and some info got lost in the shuffle.
Bitmaps can only be frozen during a backup operation, and a backup
operation should prevent a resize operation, so just assert that this
cannot happen.
Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
---
block.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/block.c b/block.c
index 2786e47..4ea2c4f 100644
--- a/block.c
+++ b/block.c
@@ -3220,9 +3220,7 @@ static void bdrv_dirty_bitmap_truncate(BlockDriverState *bs)
uint64_t size = bdrv_nb_sectors(bs);
QLIST_FOREACH(bitmap, &bs->dirty_bitmaps, list) {
- if (bdrv_dirty_bitmap_frozen(bitmap)) {
- continue;
- }
+ assert(!bdrv_dirty_bitmap_frozen(bitmap));
hbitmap_truncate(bitmap->bitmap, size);
bitmap->size = size;
}
--
2.1.0
next reply other threads:[~2015-06-10 17:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-10 17:24 John Snow [this message]
2015-06-10 20:52 ` [Qemu-devel] [PATCH] block: Change bitmap truncate conditional to assertion Eric Blake
2015-06-10 20:55 ` John Snow
2015-06-11 8:26 ` Kevin Wolf
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=1433957094-8303-1-git-send-email-jsnow@redhat.com \
--to=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.com \
/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.