From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMbiG-0007Ae-6P for qemu-devel@nongnu.org; Wed, 18 May 2011 04:02:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMbiF-0001N1-4t for qemu-devel@nongnu.org; Wed, 18 May 2011 04:02:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMbiE-0001Mv-Tn for qemu-devel@nongnu.org; Wed, 18 May 2011 04:02:35 -0400 Message-ID: <4DD37DBC.8090500@redhat.com> Date: Wed, 18 May 2011 10:05:16 +0200 From: Kevin Wolf MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: stanislav.ievlev@gmail.com, Dmitry Konishchev , qemu-devel@nongnu.org Am 18.05.2011 09:57, schrieb Stefan Hajnoczi: > On Wed, May 18, 2011 at 7:55 AM, Dmitry Konishchev wrote: >> So, if you are agreed with the said above, you can accept this patch >> and then I'll write an enchancement for it with bdrv_is_allocated() >> because it is going to include this patch. > > Yes, optimizing is_not_zero() is good. The only additional thing I > suggest is adding a comment before the function to document the length > constraint. > > Kevin Wolf is CCed, he's the QEMU block layer maintainer and may have > additional thoughts before accepting this patch. For this one not really. Except for the coding style it looks good to me. A future bdrv_is_allocated() patch must make sure that the conversion falls back to a simple is_not_zero() when a backing file is used. Kevin