From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbQX8-0000Cw-VE for qemu-devel@nongnu.org; Wed, 30 Oct 2013 03:49:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbQX0-00075E-I4 for qemu-devel@nongnu.org; Wed, 30 Oct 2013 03:49:42 -0400 Received: from mail-ea0-x234.google.com ([2a00:1450:4013:c01::234]:39405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbQX0-000758-Ag for qemu-devel@nongnu.org; Wed, 30 Oct 2013 03:49:34 -0400 Received: by mail-ea0-f180.google.com with SMTP id l9so357714eaj.39 for ; Wed, 30 Oct 2013 00:49:33 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5270BA07.3020503@redhat.com> Date: Wed, 30 Oct 2013 08:49:27 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1383116892-11047-1-git-send-email-famz@redhat.com> <1383116892-11047-3-git-send-email-famz@redhat.com> In-Reply-To: <1383116892-11047-3-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/3] HBitmap: add QLIST_ENTRY to HBitmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com 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 > --- > 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 > #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