From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wuw7t-0006xV-OO for qemu-devel@nongnu.org; Wed, 11 Jun 2014 23:56:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wuw7o-0004K8-LC for qemu-devel@nongnu.org; Wed, 11 Jun 2014 23:56:33 -0400 Received: from [59.151.112.132] (port=22634 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wuw7o-0004Ih-AC for qemu-devel@nongnu.org; Wed, 11 Jun 2014 23:56:28 -0400 From: Hu Tao Date: Thu, 12 Jun 2014 11:54:21 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v10 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: kwolf@redhat.com, Peter Lieven , Markus Armbruster , Max Reitz , Stefan Hajnoczi , y-goto@jp.fujitsu.com 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. note: there are two false positives of checkpatch.pl to patch 01. changes to v9: - use ROUND_UP to do round up - split the round up into its own patch and add test case - new patch rename parse_enum_option to qapi_enum_parse and make it public - reuse qapi_enum_parse Hu Tao (6): block: round up file size to nearest sector raw, qcow2: don't convert file size to sector size rename parse_enum_option to qapi_enum_parse and make it public qapi: introduce PreallocMode and a new PreallocMode full. raw-posix: Add full image preallocation option qcow2: Add full image preallocation option block/qcow2.c | 102 ++++++++++++++++++++++++++++++++++++++------- block/raw-posix.c | 61 +++++++++++++++++++++++---- block/raw-win32.c | 4 +- blockdev.c | 22 +--------- include/qapi/util.h | 17 ++++++++ qapi-schema.json | 14 +++++++ qapi/Makefile.objs | 2 +- qapi/qapi-util.c | 32 ++++++++++++++ tests/qemu-iotests/082.out | 54 ++++++++++++------------ tests/qemu-iotests/093 | 64 ++++++++++++++++++++++++++++ tests/qemu-iotests/093.out | 14 +++++++ tests/qemu-iotests/group | 1 + 12 files changed, 313 insertions(+), 74 deletions(-) create mode 100644 include/qapi/util.h create mode 100644 qapi/qapi-util.c create mode 100755 tests/qemu-iotests/093 create mode 100644 tests/qemu-iotests/093.out -- 1.9.3