From: Eric Blake <eblake@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org,
Ilkka Tengvall <ilkka.tengvall@cybercom.com>
Subject: Re: [Qemu-devel] [PATCH 4/4] qemu-iotests: add 053 unaligned compressed image size test
Date: Mon, 15 Apr 2013 09:38:28 -0600 [thread overview]
Message-ID: <516C1EF4.4010903@redhat.com> (raw)
In-Reply-To: <1366039054-32536-5-git-send-email-stefanha@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1200 bytes --]
On 04/15/2013 09:17 AM, Stefan Hajnoczi wrote:
> Test that qemu-img convert -c works when input image length is not a
> multiple of the cluster size.
>
> Previously an error message would be produced:
>
> qemu-img: error while compressing sector 0: Input/output error
>
> Now that qcow2 and qcow handle this case the test passes successfully.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> +echo
> +echo "== Creating single sector image =="
> +
> +_make_test_img 512
> +$QEMU_IO -c "write -P0xa 0 512" $TEST_IMG | _filter_qemu_io
> +mv $TEST_IMG $TEST_IMG.orig
> +
> +echo
> +echo "== Converting the image, compressed =="
> +
> +$QEMU_IMG convert -c -O $IMGFMT $TEST_IMG.orig $TEST_IMG
> +_check_test_img
> +
> +# success, all done
Is it worth also testing that qemu-img info on the converted image still
reports that the guest sees a size of 512, to prove that the virtual
size was not expanded as a result of compression tail padding?
With that question answered, you have:
Series: Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
next prev parent reply other threads:[~2013-04-15 15:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-15 15:17 [Qemu-devel] [PATCH 0/4] qemu-img: support compression regardless of cluster size Stefan Hajnoczi
2013-04-15 15:17 ` [Qemu-devel] [PATCH 1/4] qcow2: allow sub-cluster compressed write to last cluster Stefan Hajnoczi
2013-04-15 15:17 ` [Qemu-devel] [PATCH 2/4] qcow: " Stefan Hajnoczi
2013-04-15 15:17 ` [Qemu-devel] [PATCH 3/4] qemu-img: do not zero-pad the compressed write buffer Stefan Hajnoczi
2013-04-15 15:17 ` [Qemu-devel] [PATCH 4/4] qemu-iotests: add 053 unaligned compressed image size test Stefan Hajnoczi
2013-04-15 15:38 ` Eric Blake [this message]
2013-04-16 8:36 ` Stefan Hajnoczi
2013-04-16 8:53 ` Kevin Wolf
2013-04-16 9:00 ` [Qemu-devel] [PATCH 0/4] qemu-img: support compression regardless of cluster size Kevin Wolf
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=516C1EF4.4010903@redhat.com \
--to=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=ilkka.tengvall@cybercom.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).