From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtTNA-0004F3-7d for qemu-devel@nongnu.org; Wed, 18 Dec 2013 21:30:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtTN4-0007lc-9G for qemu-devel@nongnu.org; Wed, 18 Dec 2013 21:30:00 -0500 Received: from [222.73.24.84] (port=44631 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtTN3-0007l3-TX for qemu-devel@nongnu.org; Wed, 18 Dec 2013 21:29:54 -0500 From: Hu Tao Date: Thu, 19 Dec 2013 10:27:35 +0800 Message-Id: Subject: [Qemu-devel] [RFC PATCH v3 0/6] qemu-img: add preallocation=full List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Fam Zheng , Peter Lieven , hutao@cn.fujitsu.com 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. v3: - Fix comments to v2 by Fam. - qcow2: first fallocate disk space, then allocate metadata. This avoids the problem in v2 that bdrv_preallocate may clear all information in metadata. This does not necessarily map all data clusters sequentially but does keep information in metadata. Peter, is this acceptable? Hu Tao (6): block: introduce prealloc_mode block: add BlockDriver.bdrv_preallocate. block/raw-posix: implement bdrv_preallocate raw-posix: Add full image preallocation option qcow2: implement bdrv_preallocate qcow2: Add full image preallocation option block.c | 13 +++++++++++ block/qcow2.c | 33 ++++++++++++++++++++++------ block/raw-posix.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++ include/block/block.h | 7 ++++++ include/block/block_int.h | 3 +++ 5 files changed, 105 insertions(+), 7 deletions(-) -- 1.7.11.7