* [Qemu-devel] [PATCH] block: Change bitmap truncate conditional to assertion
@ 2015-06-10 17:24 John Snow
2015-06-10 20:52 ` Eric Blake
0 siblings, 1 reply; 4+ messages in thread
From: John Snow @ 2015-06-10 17:24 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, vsementsov, John Snow, qemu-devel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Change bitmap truncate conditional to assertion
2015-06-10 17:24 [Qemu-devel] [PATCH] block: Change bitmap truncate conditional to assertion John Snow
@ 2015-06-10 20:52 ` Eric Blake
2015-06-10 20:55 ` John Snow
0 siblings, 1 reply; 4+ messages in thread
From: Eric Blake @ 2015-06-10 20:52 UTC (permalink / raw)
To: John Snow, qemu-block; +Cc: kwolf, vsementsov, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 881 bytes --]
On 06/10/2015 11:24 AM, John Snow wrote:
> Requires: 1433796555-5608-1-git-send-email-jsnow@redhat.com
> [PATCH] block: record new size in bdrv_dirty_bitmap_truncate
>
Shouldn't this be after the '---' separator?
> 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(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Change bitmap truncate conditional to assertion
2015-06-10 20:52 ` Eric Blake
@ 2015-06-10 20:55 ` John Snow
2015-06-11 8:26 ` Kevin Wolf
0 siblings, 1 reply; 4+ messages in thread
From: John Snow @ 2015-06-10 20:55 UTC (permalink / raw)
To: Eric Blake, qemu-block; +Cc: kwolf, vsementsov, qemu-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 06/10/2015 04:52 PM, Eric Blake wrote:
> On 06/10/2015 11:24 AM, John Snow wrote:
>> Requires: 1433796555-5608-1-git-send-email-jsnow@redhat.com
>> [PATCH] block: record new size in bdrv_dirty_bitmap_truncate
>>
>
> Shouldn't this be after the '---' separator?
>
Sorry, not used to sending single patches without a cover letter.
Kevin: If it's not inconvenient for you to do, please delete these
lines on commit.
>> 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(-)
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJVeKQoAAoJEH3vgQaq/DkO4bAQAIDn75jog313WnsmZ7uRPNQ3
qhCOGUjr4e2S80k7o/blQjXm8eZZjijBPPCmqT68uX5JI9JXcuMRCkbALGSzI7nt
U4GidZWYd+D1G97DYfDCpEeKmaRLgoG8OOxnuUIGZIAmmf8NMlTFtNczFeFNwzWC
LhVh+aQHyoxsDlIrkHPDyMcGm0LTZ5aWsOx/FhaRjKP0pEm6bAav7pxovjlxsc1R
GyVch0wpOyqppKmvaZ3tQGMPCQksoLGSBrAG6q89Ip9LsdFcPphUg0Wee1RMgrbx
zKOaI5+vA8dOTpVZqQ03/AOnJLUwgaePupDn9L03LXrmrKDbVV9huUes+aUfyNnM
iGdmQRtmQfjQKa0svCsRqtgzPoCNnnDDvuPcSzVFj8+hU01zqnf29peS8bSkTqeW
xPoTiIp2+lfmegd2Va/NYoVk+qQo5iDGZshTtjRhkGx5tqKt6RikZT7f3UTPeG8i
1PZM9k6J9zAtrjHyBHwrWo+naFSDwl0iXwtxj/NjZ0nyiLE4yCq5ucWQowITpSin
qh8KDLuMP0zCXDSdfQAiO/adxAisiVcOXSomdGJKmY/DiU9wkFYKT3paicASplky
/X8DN4Gs0dKx93wl0NDGMTO4+i8KE7uC1HBuFE7YomFYexWGQ7EBPqjb7RyFsSjq
il//J7BQPXDhkwId1jHF
=ck4X
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Change bitmap truncate conditional to assertion
2015-06-10 20:55 ` John Snow
@ 2015-06-11 8:26 ` Kevin Wolf
0 siblings, 0 replies; 4+ messages in thread
From: Kevin Wolf @ 2015-06-11 8:26 UTC (permalink / raw)
To: John Snow; +Cc: vsementsov, qemu-devel, qemu-block
[-- Attachment #1: Type: text/plain, Size: 1151 bytes --]
Am 10.06.2015 um 22:55 hat John Snow geschrieben:
> On 06/10/2015 04:52 PM, Eric Blake wrote:
> > On 06/10/2015 11:24 AM, John Snow wrote:
> >> Requires: 1433796555-5608-1-git-send-email-jsnow@redhat.com
> >> [PATCH] block: record new size in bdrv_dirty_bitmap_truncate
> >>
> >
> > Shouldn't this be after the '---' separator?
> >
>
> Sorry, not used to sending single patches without a cover letter.
>
> Kevin: If it's not inconvenient for you to do, please delete these
> lines on commit.
No problem.
> >> 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(-)
> >
> > Reviewed-by: Eric Blake <eblake@redhat.com>
Thanks, applied to the block branch.
Kevin
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-11 8:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-10 17:24 [Qemu-devel] [PATCH] block: Change bitmap truncate conditional to assertion John Snow
2015-06-10 20:52 ` Eric Blake
2015-06-10 20:55 ` John Snow
2015-06-11 8:26 ` Kevin Wolf
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.