[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] HBitmap: add QLIST_ENTRY to HBitmap
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 2/3] HBitmap: add QLIST_ENTRY to HBitmap |
Date: |
Wed, 30 Oct 2013 08:49:27 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 |
Il 30/10/2013 08:08, Fam Zheng ha scritto:
> A BlockDriverState will contain multiple bitmaps soon, add list field
> into HBitmap to prepare for later changes.
>
> Signed-off-by: Fam Zheng <address@hidden>
> ---
> include/qemu/hbitmap.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/include/qemu/hbitmap.h b/include/qemu/hbitmap.h
> index b6ea5c7..2281b37 100644
> --- a/include/qemu/hbitmap.h
> +++ b/include/qemu/hbitmap.h
> @@ -17,6 +17,7 @@
> #include <stdbool.h>
> #include "bitops.h"
> #include "host-utils.h"
> +#include "qemu/queue.h"
>
> typedef struct HBitmap HBitmap;
>
> @@ -88,6 +89,8 @@ struct HBitmap {
> * bitmap will still allocate HBITMAP_LEVELS arrays.
> */
> unsigned long *levels[HBITMAP_LEVELS];
> +
> + QLIST_ENTRY (HBitmap) list;
> };
>
> /**
>
I think you should add a separate list data structure in
BlockDriverState, and leave HBitmap untouched. This also removes the
need for patch 1.
Paolo