* [Qemu-devel] [PATCH] block: remove bdrv_dirty_bitmap_make_anon
@ 2018-03-23 16:42 Paolo Bonzini
2018-03-26 10:13 ` Vladimir Sementsov-Ogievskiy
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Paolo Bonzini @ 2018-03-23 16:42 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-block, Vladimir Sementsov-Ogievskiy
All this function is doing will be repeated by
bdrv_do_release_matching_dirty_bitmap_locked, except
resetting bm->persistent. But even that does not matter
because the bitmap will be freed.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
block/dirty-bitmap.c | 9 ---------
blockdev.c | 1 -
include/block/dirty-bitmap.h | 1 -
3 files changed, 11 deletions(-)
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index e27b3096dd..13bb5066a4 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -97,15 +97,6 @@ BdrvDirtyBitmap *bdrv_find_dirty_bitmap(BlockDriverState *bs, const char *name)
return NULL;
}
-/* Called with BQL taken. */
-void bdrv_dirty_bitmap_make_anon(BdrvDirtyBitmap *bitmap)
-{
- assert(!bdrv_dirty_bitmap_frozen(bitmap));
- g_free(bitmap->name);
- bitmap->name = NULL;
- bitmap->persistent = false;
-}
-
/* Called with BQL taken. */
BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs,
uint32_t granularity,
diff --git a/blockdev.c b/blockdev.c
index c31bf3d98d..6eb18c4ef1 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2881,7 +2881,6 @@ void qmp_block_dirty_bitmap_remove(const char *node, const char *name,
}
}
- bdrv_dirty_bitmap_make_anon(bitmap);
bdrv_release_dirty_bitmap(bs, bitmap);
}
diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h
index 1ff8949b1b..5a51a78b63 100644
--- a/include/block/dirty-bitmap.h
+++ b/include/block/dirty-bitmap.h
@@ -24,7 +24,6 @@ BdrvDirtyBitmap *bdrv_reclaim_dirty_bitmap(BlockDriverState *bs,
void bdrv_dirty_bitmap_enable_successor(BdrvDirtyBitmap *bitmap);
BdrvDirtyBitmap *bdrv_find_dirty_bitmap(BlockDriverState *bs,
const char *name);
-void bdrv_dirty_bitmap_make_anon(BdrvDirtyBitmap *bitmap);
void bdrv_release_dirty_bitmap(BlockDriverState *bs, BdrvDirtyBitmap *bitmap);
void bdrv_release_named_dirty_bitmaps(BlockDriverState *bs);
void bdrv_release_persistent_dirty_bitmaps(BlockDriverState *bs);
--
2.16.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] block: remove bdrv_dirty_bitmap_make_anon
2018-03-23 16:42 [Qemu-devel] [PATCH] block: remove bdrv_dirty_bitmap_make_anon Paolo Bonzini
@ 2018-03-26 10:13 ` Vladimir Sementsov-Ogievskiy
2018-04-03 12:50 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2018-04-19 20:18 ` John Snow
2 siblings, 0 replies; 4+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2018-03-26 10:13 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: qemu-block
23.03.2018 19:42, Paolo Bonzini wrote:
> All this function is doing will be repeated by
> bdrv_do_release_matching_dirty_bitmap_locked, except
> resetting bm->persistent. But even that does not matter
> because the bitmap will be freed.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
--
Best regards,
Vladimir
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [Qemu-block] [PATCH] block: remove bdrv_dirty_bitmap_make_anon
2018-03-23 16:42 [Qemu-devel] [PATCH] block: remove bdrv_dirty_bitmap_make_anon Paolo Bonzini
2018-03-26 10:13 ` Vladimir Sementsov-Ogievskiy
@ 2018-04-03 12:50 ` Stefan Hajnoczi
2018-04-19 20:18 ` John Snow
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2018-04-03 12:50 UTC (permalink / raw)
To: Paolo Bonzini
Cc: qemu-devel, Vladimir Sementsov-Ogievskiy, qemu-block, Fam Zheng,
John Snow
[-- Attachment #1: Type: text/plain, Size: 606 bytes --]
On Fri, Mar 23, 2018 at 05:42:53PM +0100, Paolo Bonzini wrote:
> All this function is doing will be repeated by
> bdrv_do_release_matching_dirty_bitmap_locked, except
> resetting bm->persistent. But even that does not matter
> because the bitmap will be freed.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> block/dirty-bitmap.c | 9 ---------
> blockdev.c | 1 -
> include/block/dirty-bitmap.h | 1 -
> 3 files changed, 11 deletions(-)
CCing Fam and John, who maintain block/dirty-bitmap.c.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [Qemu-block] [PATCH] block: remove bdrv_dirty_bitmap_make_anon
2018-03-23 16:42 [Qemu-devel] [PATCH] block: remove bdrv_dirty_bitmap_make_anon Paolo Bonzini
2018-03-26 10:13 ` Vladimir Sementsov-Ogievskiy
2018-04-03 12:50 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
@ 2018-04-19 20:18 ` John Snow
2 siblings, 0 replies; 4+ messages in thread
From: John Snow @ 2018-04-19 20:18 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: Vladimir Sementsov-Ogievskiy, qemu-block
On 03/23/2018 12:42 PM, Paolo Bonzini wrote:
> All this function is doing will be repeated by
> bdrv_do_release_matching_dirty_bitmap_locked, except
> resetting bm->persistent. But even that does not matter
> because the bitmap will be freed.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> block/dirty-bitmap.c | 9 ---------
> blockdev.c | 1 -
> include/block/dirty-bitmap.h | 1 -
> 3 files changed, 11 deletions(-)
>
> diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
> index e27b3096dd..13bb5066a4 100644
> --- a/block/dirty-bitmap.c
> +++ b/block/dirty-bitmap.c
> @@ -97,15 +97,6 @@ BdrvDirtyBitmap *bdrv_find_dirty_bitmap(BlockDriverState *bs, const char *name)
> return NULL;
> }
>
> -/* Called with BQL taken. */
> -void bdrv_dirty_bitmap_make_anon(BdrvDirtyBitmap *bitmap)
> -{
> - assert(!bdrv_dirty_bitmap_frozen(bitmap));
> - g_free(bitmap->name);
> - bitmap->name = NULL;
> - bitmap->persistent = false;
> -}
> -
> /* Called with BQL taken. */
> BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs,
> uint32_t granularity,
> diff --git a/blockdev.c b/blockdev.c
> index c31bf3d98d..6eb18c4ef1 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -2881,7 +2881,6 @@ void qmp_block_dirty_bitmap_remove(const char *node, const char *name,
> }
> }
>
> - bdrv_dirty_bitmap_make_anon(bitmap);
> bdrv_release_dirty_bitmap(bs, bitmap);
> }
>
> diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h
> index 1ff8949b1b..5a51a78b63 100644
> --- a/include/block/dirty-bitmap.h
> +++ b/include/block/dirty-bitmap.h
> @@ -24,7 +24,6 @@ BdrvDirtyBitmap *bdrv_reclaim_dirty_bitmap(BlockDriverState *bs,
> void bdrv_dirty_bitmap_enable_successor(BdrvDirtyBitmap *bitmap);
> BdrvDirtyBitmap *bdrv_find_dirty_bitmap(BlockDriverState *bs,
> const char *name);
> -void bdrv_dirty_bitmap_make_anon(BdrvDirtyBitmap *bitmap);
> void bdrv_release_dirty_bitmap(BlockDriverState *bs, BdrvDirtyBitmap *bitmap);
> void bdrv_release_named_dirty_bitmaps(BlockDriverState *bs);
> void bdrv_release_persistent_dirty_bitmaps(BlockDriverState *bs);
>
Just a weird artifact of the way in which we used to think this
subsystem would work; that maybe we'd want to return named bitmaps to
being anonymous.
Thanks, applied to my bitmaps tree:
https://github.com/jnsnow/qemu/commits/bitmaps
https://github.com/jnsnow/qemu.git
--js
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-04-19 20:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-23 16:42 [Qemu-devel] [PATCH] block: remove bdrv_dirty_bitmap_make_anon Paolo Bonzini
2018-03-26 10:13 ` Vladimir Sementsov-Ogievskiy
2018-04-03 12:50 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2018-04-19 20:18 ` John Snow
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.