From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRGgi-0000z0-2I for qemu-devel@nongnu.org; Tue, 09 Sep 2014 04:22:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRGgb-00071Z-UT for qemu-devel@nongnu.org; Tue, 09 Sep 2014 04:22:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRGgb-00071Q-O7 for qemu-devel@nongnu.org; Tue, 09 Sep 2014 04:22:01 -0400 Date: Tue, 9 Sep 2014 10:21:54 +0200 From: Kevin Wolf Message-ID: <20140909082154.GC4847@noname.str.redhat.com> References: <1409568798-2292-1-git-send-email-junmuzi@gmail.com> <20140905102123.GE4656@noname.str.redhat.com> <20140909025228.GA5336@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140909025228.GA5336@localhost.localdomain> Subject: Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jun Li Cc: famz@redhat.com, juli@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com Am 09.09.2014 um 04:52 hat Jun Li geschrieben: > On Fri, 09/05 12:21, Kevin Wolf wrote: > > Am 01.09.2014 um 12:52 hat Jun Li geschrieben: > > > When every item of refcount block is NULL, free refcount block and reset the > > > corresponding item of refcount table with NULL. > > > > > > Signed-off-by: Jun Li > > > > The commit message should also describe why this is a relevant > > improvement for some use case. My gut feeling is that it complicates the > > code for a very minimal gain. > > Hi Kevin, > > "Add update refcount table realization for update_refcount" is nesseary for > qcow2 shrinking. I will submit v3 of "qcow2: Patch for shrinking qcow2 disk > image". When check the code of update_refcount, I find it lacks of this patch. Why is it necessary? Can't you just leave the refcount blocks allocated? They shouldn't take a lot of space. Kevin