From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWW2K-00062b-FR for qemu-devel@nongnu.org; Tue, 14 Jun 2011 12:00:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWW2I-0002RB-Rc for qemu-devel@nongnu.org; Tue, 14 Jun 2011 12:00:16 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:33252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWW2I-0002R6-Gy for qemu-devel@nongnu.org; Tue, 14 Jun 2011 12:00:14 -0400 Received: by yxs7 with SMTP id 7so1312606yxs.4 for ; Tue, 14 Jun 2011 09:00:13 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1307544625-22907-1-git-send-email-konishchev@gmail.com> <20110613082608.GA25582@stefanha-thinkpad.localdomain> Date: Tue, 14 Jun 2011 16:58:23 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dmitry Konishchev Cc: Kevin Wolf , qemu-devel@nongnu.org On Tue, Jun 14, 2011 at 8:43 AM, Dmitry Konishchev wrote: > On Mon, Jun 13, 2011 at 1:13 PM, Dmitry Konishchev wrote: >> I haven't done this because in this case I have to pass too lot of >> local variables to this function. Just not sure that it'll look >> better. But if you mind I surely can do this. > Should I? Yes, please. For image files the block layer should be caching the device capacity (size) anyway, so you probably don't need to allocate the array, just call bdrv_get_geometry(). That might make it easier to write a self-contained function. Stefan