From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60641 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PBQEn-00089v-6G for qemu-devel@nongnu.org; Thu, 28 Oct 2010 07:01:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PBQEl-0005kv-HY for qemu-devel@nongnu.org; Thu, 28 Oct 2010 07:01:41 -0400 Received: from mtagate6.de.ibm.com ([195.212.17.166]:57057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PBQEl-0005kh-8Q for qemu-devel@nongnu.org; Thu, 28 Oct 2010 07:01:39 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate6.de.ibm.com (8.13.1/8.13.1) with ESMTP id o9SB1bJ4019135 for ; Thu, 28 Oct 2010 11:01:37 GMT Received: from d12av03.megacenter.de.ibm.com (d12av03.megacenter.de.ibm.com [9.149.165.213]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9SB1XMo3997738 for ; Thu, 28 Oct 2010 13:01:37 +0200 Received: from d12av03.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av03.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o9SB1XM0029883 for ; Thu, 28 Oct 2010 13:01:33 +0200 From: Stefan Hajnoczi Date: Thu, 28 Oct 2010 12:01:19 +0100 Message-Id: <1288263684-18892-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v4 0/5] qed: Add QEMU Enhanced Disk format List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Anthony Liguori , Avi Kivity , Stefan Hajnoczi , Christoph Hellwig QEMU Enhanced Disk format is a disk image format that forgoes features found in qcow2 in favor of better levels of performance and data integrity. Due to its simpler on-disk layout, it is possible to safely perform metadata updates more efficiently. Installations, suspend-to-disk, and other allocation-heavy I/O workloads will see increased performance due to fewer I/Os and syncs. Workloads that do not cause new clusters to be allocated will perform similar to raw images due to in-memory metadata caching. The format supports sparse disk images. It does not rely on the host filesystem holes feature, making it a good choice for sparse disk images that need to be transferred over channels where holes are not supported. Backing files are supported so only deltas against a base image can be stored. The base image may be smaller than the image file. The file format is extensible so that additional features can be added later with graceful compatibility handling. A specification for the file format is included in this patchset. Internal snapshots are not supported. This eliminates the need for additional metadata to track copy-on-write clusters. Compression and encryption are not supported. They add complexity and can be implemented at other layers in the stack (i.e. inside the guest or on the host). Encryption has been identified as a potential future extension and the file format allows for this. Signed-off-by: Anthony Liguori Signed-off-by: Stefan Hajnoczi --- This code is also available from git: http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/qed-v4 I have preserved distinct commits against v3 for easier reviewing here: http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/qed-v4-presquash v4: * Use bdrv_*() instead of POSIX APIs to create an image file * Lift the non-zero image size restriction * Fix qed.c/qed.h style comments from Kevin v3: * Flush before L2 update when a backing file is used * Use QED_F_BACKING_FORMAT_NO_PROBE instead of backing_fmt header field * Allow non-cluster sized images * Implement autoclear feature bits * Implement backing image smaller size - reads from backing image should zero beyond EOF * Preserve errno in qed_find_cluster_cb() - don't dumb down to QED_CLUSTER_ERROR * Use ffs() instead of get_bits_from_size() * Remove l2_cache argument to qed_unref_l2_cache_entry * Eliminate L2TableAllocFunc function pointer * Split qed_aio_write in-place and allocating code path to make code clearer * Document how L2 cache is used * Document qed_find_cluster() * Update QED specification * Fix COPYING.LIB LGPL license file references * Add copyright header to qed-check.c * Avoid the bytes_to_str()/cvtstr()/sztostr() dependency until Jes' strtosz() goes in v2: * Add QED format specification to documentation * Use __builtin_ctzl() for get_bits_from_size() * Fine-grained table locking to allow concurrent allocating write requests * Fix qemu_free() instead of qemu_vfree() in qed_unref_l2_cache_entry() * Comment clean-ups Makefile.objs | 2 + block/qed-check.c | 210 +++++++ block/qed-cluster.c | 154 ++++++ block/qed-gencb.c | 32 ++ block/qed-l2-cache.c | 173 ++++++ block/qed-lock.c | 124 +++++ block/qed-table.c | 317 +++++++++++ block/qed.c | 1382 +++++++++++++++++++++++++++++++++++++++++++++++ block/qed.h | 315 +++++++++++ block_int.h | 1 + docs/specs/qed_spec.txt | 128 +++++ trace-events | 21 + 12 files changed, 2859 insertions(+), 0 deletions(-)