From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adBuo-0006EX-T1 for qemu-devel@nongnu.org; Tue, 08 Mar 2016 02:18:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adBuo-0001cq-5T for qemu-devel@nongnu.org; Tue, 08 Mar 2016 02:18:46 -0500 Date: Tue, 8 Mar 2016 15:18:31 +0800 From: Fam Zheng Message-ID: <20160308071830.GB16648@ad.usersys.redhat.com> References: <1457417915-11869-1-git-send-email-famz@redhat.com> <20160308071042.GC2377@pxdev.xzpeter.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160308071042.GC2377@pxdev.xzpeter.org> Subject: Re: [Qemu-devel] [PATCH] vmdk: Switch to heap arrays for vmdk_write_cid List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Xu Cc: Kevin Wolf , pbonzini@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org On Tue, 03/08 15:10, Peter Xu wrote: > On Tue, Mar 08, 2016 at 02:18:35PM +0800, Fam Zheng wrote: > > It is only called once for each opened image, so we can do it the easy > > way. > > > > Signed-off-by: Fam Zheng > > --- > > block/vmdk.c | 25 ++++++++++++++----------- > > 1 file changed, 14 insertions(+), 11 deletions(-) > > > > diff --git a/block/vmdk.c b/block/vmdk.c > > index a8db5d9..1ec2452 100644 > > --- a/block/vmdk.c > > +++ b/block/vmdk.c > > @@ -274,36 +274,39 @@ static uint32_t vmdk_read_cid(BlockDriverState *bs, int parent) > > > > static int vmdk_write_cid(BlockDriverState *bs, uint32_t cid) > > If to use heap in write, do we need to do the same for e.g., > vmdk_parent_open() and vmdk_read_cid(), to make all things at least > aligned? Yes, let's change them altogether. Fam