From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUugU-00088H-4H for qemu-devel@nongnu.org; Fri, 19 Sep 2014 05:41:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUugN-0006rJ-VD for qemu-devel@nongnu.org; Fri, 19 Sep 2014 05:40:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUugN-0006qr-MU for qemu-devel@nongnu.org; Fri, 19 Sep 2014 05:40:51 -0400 Date: Fri, 19 Sep 2014 10:40:40 +0100 From: Stefan Hajnoczi Message-ID: <20140919094040.GD27501@stefanha-thinkpad.redhat.com> References: <1410877464-20481-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VV4b6MQE+OnNyhkM" Content-Disposition: inline In-Reply-To: <1410877464-20481-1-git-send-email-stefanha@redhat.com> Subject: Re: [Qemu-devel] [PATCH] block: delete cow block driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , shhuiw@163.com, Markus Armbruster --VV4b6MQE+OnNyhkM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 16, 2014 at 03:24:24PM +0100, Stefan Hajnoczi wrote: > This patch removes support for the cow file format. >=20 > Normally we do not break backwards compatibility but in this case there > is no impact and it is the most logical option. Extraordinary claims > require extraordinary evidence so I will show why removing the cow block > driver is the right thing to do. >=20 > The cow file format is the disk image format for Usermode Linux, a way > of running a Linux system in userspace. The performance of UML was > never great and it was hacky, but it enjoyed some popularity before > hardware virtualization support became mainstream. >=20 > QEMU's block/cow.c is supposed to read this image file format. > Unfortunately the file format was underspecified: >=20 > 1. Earlier Linux versions used the MAXPATHLEN constant for the backing > filename field. The value of MAXPATHLEN can change, so Linux > switched to a 4096 literal but QEMU has a 1024 literal. >=20 > 2. Padding was not used on the header struct (both in the Linux kernel > and in QEMU) so the struct layout varied across architectures. In > particular, i386 and x86_64 were different due to int64_t alignment > differences. Linux now uses __attribute__((packed)), QEMU does not. >=20 > Therefore: >=20 > 1. QEMU cow images do not conform to the Linux cow image file format. >=20 > 2. cow images cannot be shared between different host architectures. >=20 > This means QEMU cow images are useless and QEMU has not had bug reports > from users actually hitting these issues. >=20 > Let's get rid of this thing, it serves no purpose and no one will be > affected. >=20 > Signed-off-by: Stefan Hajnoczi > --- > block/Makefile.objs | 2 +- > block/cow.c | 432 -------------------------------------= ------ > qapi/block-core.json | 5 +- > qemu-doc.texi | 9 - > qemu-img.texi | 4 +- > qmp-commands.hx | 2 +- > tests/image-fuzzer/runner.py | 5 +- > tests/qemu-iotests/069 | 2 +- > tests/qemu-iotests/072 | 2 +- > tests/qemu-iotests/099 | 2 +- > tests/qemu-iotests/common | 6 - > ui/cocoa.m | 2 +- > 12 files changed, 12 insertions(+), 461 deletions(-) > delete mode 100644 block/cow.c Applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan --VV4b6MQE+OnNyhkM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUG/oYAAoJEJykq7OBq3PIs5UH/3PxnxmYxOzmGJkBBgQpaQM6 qjKjYVft7fUinXWNBI7U/Xta6/lyAWs8pKBReCm4ubo6BuuDg1KTpepNBUyzlwIG lrcQmOBYx5pc7RhtsBhxRfL3rFOHhIG+GA9CrlmQDu6W0booGlc8RbvABWA0fR3e 4vfF3ngGFsrcWur0nX3WQgU/CX1+++oQx2YET17NUqVtG5CcMjPv2IOlHsGloJxw NtvXUsYVoKfmZrdMJnq0NL9QGVdJo1/EeRBflnAudiAGNpL7L6AbRp5NOntNiWLt 6xY2vvavJ5ks0xeo9/1DfvjAoNI8CsWDWZ2dgBTtnquWQOSGdCXh+wyMT7wYXDY= =79tv -----END PGP SIGNATURE----- --VV4b6MQE+OnNyhkM--