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 <f...@redhat.com> > --- > 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