Message ID | 1383116892-11047-3-git-send-email-famz@redhat.com |
---|---|
State | New |
Headers | show |
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 <famz@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
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; }; /**
A BlockDriverState will contain multiple bitmaps soon, add list field into HBitmap to prepare for later changes. Signed-off-by: Fam Zheng <famz@redhat.com> --- include/qemu/hbitmap.h | 3 +++ 1 file changed, 3 insertions(+)