From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
shhuiw@163.com, Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] block: delete cow block driver
Date: Fri, 19 Sep 2014 10:40:40 +0100 [thread overview]
Message-ID: <20140919094040.GD27501@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1410877464-20481-1-git-send-email-stefanha@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2463 bytes --]
On Tue, Sep 16, 2014 at 03:24:24PM +0100, Stefan Hajnoczi wrote:
> This patch removes support for the cow file format.
>
> 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.
>
> 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.
>
> QEMU's block/cow.c is supposed to read this image file format.
> Unfortunately the file format was underspecified:
>
> 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.
>
> 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.
>
> Therefore:
>
> 1. QEMU cow images do not conform to the Linux cow image file format.
>
> 2. cow images cannot be shared between different host architectures.
>
> This means QEMU cow images are useless and QEMU has not had bug reports
> from users actually hitting these issues.
>
> Let's get rid of this thing, it serves no purpose and no one will be
> affected.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> 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
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2014-09-19 9:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 14:24 [Qemu-devel] [PATCH] block: delete cow block driver Stefan Hajnoczi
2014-09-16 15:56 ` Markus Armbruster
2014-09-17 2:29 ` Fam Zheng
2014-09-19 9:40 ` Stefan Hajnoczi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140919094040.GD27501@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=shhuiw@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).