From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJ1f7-0006Hk-VI for qemu-devel@nongnu.org; Thu, 27 Feb 2014 09:10:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJ1ez-0002Xs-IH for qemu-devel@nongnu.org; Thu, 27 Feb 2014 09:10:09 -0500 Received: from mail-wg0-x22a.google.com ([2a00:1450:400c:c00::22a]:34069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJ1ez-0002Xa-9q for qemu-devel@nongnu.org; Thu, 27 Feb 2014 09:10:01 -0500 Received: by mail-wg0-f42.google.com with SMTP id x13so2899105wgg.1 for ; Thu, 27 Feb 2014 06:10:00 -0800 (PST) Date: Thu, 27 Feb 2014 15:09:57 +0100 From: Stefan Hajnoczi Message-ID: <20140227140957.GF30387@stefanha-thinkpad.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v5 RESEND 0/4] qemu-img: add preallocation=full List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hu Tao Cc: Kevin Wolf , Fam Zheng , Peter Lieven , qemu-devel@nongnu.org On Tue, Feb 11, 2014 at 03:07:06PM +0800, Hu Tao wrote: > This series implements full image preallocation to create a non-sparse image > file at creation time, both for raw and qcow2 format. The purpose is to avoid > performance deterioration of the guest cause by sparse image. > > v5: > - fix wrong calculation of qcow2 metadata size in v4 > - remove raw_preallocate2() > - better error out path in raw_create() > - fix coding style > > > Hu Tao (4): > qapi: introduce PreallocMode and a new PreallocMode full. > raw, qcow2: don't convert file size to sector size > raw-posix: Add full image preallocation option > qcow2: Add full image preallocation option > > block/qcow2.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++------- > block/raw-posix.c | 45 +++++++++++++++++++++------ > qapi-schema.json | 12 ++++++++ > 3 files changed, 128 insertions(+), 20 deletions(-) Besides the comments that have been made, looks good. The metadata size calculation is correct now.