From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXmiw-0000fj-Iz for qemu-devel@nongnu.org; Wed, 09 Apr 2014 03:15:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXmip-000862-NU for qemu-devel@nongnu.org; Wed, 09 Apr 2014 03:15:06 -0400 Received: from [59.151.112.132] (port=5723 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXmip-00082D-99 for qemu-devel@nongnu.org; Wed, 09 Apr 2014 03:14:59 -0400 From: Hu Tao Date: Wed, 9 Apr 2014 15:12:33 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v8 0/4] 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 , Stefan Hajnoczi The purpose of this series is to use posix_fallocate() when creating img file to ensure there are disk space for it which is way fast than acturally writing to disk. But this only works in file system level. For cases like thin provisioning, an option full preallocation is added to write zeros to storage to ensure disk space. 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 | 95 ++++++++++++++++++++++++++++++++++++++++------ block/raw-posix.c | 63 ++++++++++++++++++++++++++---- block/raw-win32.c | 4 +- qapi-schema.json | 14 +++++++ tests/qemu-iotests/082.out | 54 +++++++++++++------------- 5 files changed, 182 insertions(+), 48 deletions(-) -- 1.8.5.2.229.g4448466