qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Alex Bligh <alex@alex.org.uk>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>,
	qemu-devel@nongnu.org, Alexandre Derumier <aderumier@odiso.com>
Subject: Re: [Qemu-devel] [PATCHv4] add qemu-img convert -C option (skip target volume creation)
Date: Mon, 26 Aug 2013 10:03:44 +0200	[thread overview]
Message-ID: <20130826080344.GA28949@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <260EC92C-EBBE-4744-99CC-8836E5CE1390@alex.org.uk>

On Thu, Aug 22, 2013 at 08:27:12PM +0100, Alex Bligh wrote:
> 
> On 22 Aug 2013, at 12:45, Stefan Hajnoczi wrote:
> The behaviour of the current code appears to be as follows
> (Alexandre's code not mine):
> 
> a) if the target volume size > the converted volume size, convert
>    leaving the remaining data on the target volume as is. This
>    is I believe useful, as on (e.g.) rbd, the target volume size
>    may be larger than required due to rounding requirements.

Seems ok.

> b) if the target volume size < the converted volume size, convert
>    truncates it but does not error. I'm torn between whether this
>    continue to do exactly as it asked, attempt to expand the
>    volume, or error. These all seem reasonably easy (the expand
>    option presumably being a call to bdrv_truncate).

Silently truncating can be a problem, e.g. the user deletes the original
file after conversion completes and later discovers not all data was
copied.

I think we should fail here.

Stefan

  reply	other threads:[~2013-08-26  8:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-12 11:41 [Qemu-devel] [PATCHv4] add qemu-img convert -C option (skip target volume creation) Alex Bligh
2013-08-22 11:45 ` Stefan Hajnoczi
2013-08-22 12:35   ` Paolo Bonzini
2013-08-22 18:03     ` Alex Bligh
2013-08-22 19:30       ` Paolo Bonzini
2013-08-22 19:46         ` Alex Bligh
2013-08-22 19:41       ` Eric Blake
2013-08-26  8:07       ` Stefan Hajnoczi
2013-08-22 19:27   ` Alex Bligh
2013-08-26  8:03     ` Stefan Hajnoczi [this message]
2013-08-26  9:13       ` Alex Bligh

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=20130826080344.GA28949@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=aderumier@odiso.com \
    --cc=alex@alex.org.uk \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).