From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2FlU-0007hQ-IE for qemu-devel@nongnu.org; Wed, 02 Jul 2014 04:19:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2FlO-0007xM-V3 for qemu-devel@nongnu.org; Wed, 02 Jul 2014 04:19:40 -0400 Received: from [59.151.112.132] (port=55274 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2FlO-0007xH-JB for qemu-devel@nongnu.org; Wed, 02 Jul 2014 04:19:34 -0400 From: Hu Tao Date: Wed, 2 Jul 2014 16:17:27 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH RFC v11 0/6] qcow2, raw: add preallocation=full and preallocation=falloc List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Yasunori Goto , qemu-devel@nongnu.org, Stefan Hajnoczi , Max Reitz Kevin, This is v11 series for you to check how the series depends on Max's minimal_blob_size(). I'm aware that you rejected the calculation of metadata size, but posting this series so that you can comment on it. This series depends on patches 1-3 of Max's series 'qemu-img: Implement commit like QMP'. Option preallocation=full preallocates disk space for image by writing zeros to disk, this ensures disk space in any cases. Option preallocation=falloc preallocates disk space by calling posix_fallocate(). This is faster than preallocation=full. The series is also at https://github.com/taohu/qemu/commits/preallocation-v11 for you to check out. changes to v10: - PreallocMode is moved from file qapi-schema.json to qapi/block-core.json - introdues preallocation=falloc, no changes to preallocation=metadata - using minimal_blob_size() to calculate metadata size for qcow2 - indentation fix in file blockdev.c 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 falloc and full preallocation option qcow2: Add falloc and full preallocation option block/qcow2.c | 54 ++++++++++++++++++++++++++++--------- block/raw-posix.c | 66 +++++++++++++++++++++++++++++++++++++++------- block/raw-win32.c | 6 ++--- blockdev.c | 30 +++++---------------- include/qapi/util.h | 17 ++++++++++++ qapi/Makefile.objs | 1 + qapi/block-core.json | 17 ++++++++++++ qapi/qapi-util.c | 32 ++++++++++++++++++++++ tests/qemu-iotests/082.out | 54 ++++++++++++++++++------------------- tests/qemu-iotests/096 | 64 ++++++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/096.out | 14 ++++++++++ tests/qemu-iotests/group | 1 + 12 files changed, 280 insertions(+), 76 deletions(-) create mode 100644 include/qapi/util.h create mode 100644 qapi/qapi-util.c create mode 100755 tests/qemu-iotests/096 create mode 100644 tests/qemu-iotests/096.out -- 1.9.3