qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ilkka Tengvall <ilkka.tengvall@cybercom.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: famz@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu-img: error while compressing, Input/output error
Date: Mon, 15 Apr 2013 14:00:24 +0300	[thread overview]
Message-ID: <516BDDC8.1040508@cybercom.com> (raw)
In-Reply-To: <20130415065203.GA13418@stefanha-thinkpad.redhat.com>

On 15.04.2013 09:52, Stefan Hajnoczi wrote:
> I discussed the bug with kwolf on Friday.  Although I sent a patch to
> add an error message when the input image length is not a multiple of
> cluster_size, Kevin pointed out that we can allow the final cluster to
> be zero-padded beyond the end of the virtual disk.
> Stefan

I second that. As an end user it is just extra complication to do that 
manually. Especially if the device really ends at the non 64K boundary, 
it's extra trouble to extend the device first. Not to talk about 
complicating the auto build scripts by needing to add the size 
calculations before all compressions.

In my case I don't mind if there is some extra bytes of zero at the end 
of a file size of hundreds of megs. I do understand the purity aspect 
though, not getting the exact same copy while doing the conversion back. 
Could there be a compatibility switch, that would handle the error 
automatically if one doesn't care about converting back to original image?

Anyways, adding the missing 64k modulo bytes works, I just tested it. 
Thanks both of you for the analysis and help!

Ilkka Tengvall


PS, evidence of the success :) :

starting filesystem compression
minimizing root partition on [/dev/loop2p1] - file check
/dev/loop2p1: 56193/102544 files (0.1% non-contiguous), 222914/409600 blocks
minimizing root partition on [/dev/loop2p1] - resizing
minimizing root partition done [/dev/loop2p1] - again file check
/dev/loop2p1: 56193/63104 files (0.4% non-contiguous), 220426/230381 blocks
the new size is [230381] of [4096] sized blocks, copying it out to [root.fs]
we need to add [12288] extra bytes to image to make the compression work
943652864+0 records in
943652864+0 records out
943652864 bytes (944 MB) copied, 2304,77 s, 409 kB/s
packing the filesystem
Completed. See 'ls -lah vmlinuz* initrd* root.fs
done building

  reply	other threads:[~2013-04-15 11:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 11:55 [Qemu-devel] qemu-img: error while compressing, Input/output error Ilkka Tengvall
2013-04-15  6:00 ` Fam Zheng
2013-04-15  6:52 ` Stefan Hajnoczi
2013-04-15 11:00   ` Ilkka Tengvall [this message]
2013-04-15 11:14     ` Stefan Hajnoczi

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=516BDDC8.1040508@cybercom.com \
    --to=ilkka.tengvall@cybercom.com \
    --cc=famz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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).