qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Sam Eiderman <sameid@google.com>
Cc: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org,
	Max Reitz <mreitz@redhat.com>,
	david.edmondson@oracle.com, Tony Zhang <tzz@google.com>
Subject: Re: Clarification regarding new qemu-img convert --target-is-zero flag
Date: Wed, 10 Jun 2020 13:37:42 +0200	[thread overview]
Message-ID: <20200610113742.GC6947@linux.fritz.box> (raw)
In-Reply-To: <CAFr6bU=tzuQNQSm4AAdYHanmTDx6fpK64OvXST2MZ5s8LqhGMA@mail.gmail.com>

Am 10.06.2020 um 08:28 hat Sam Eiderman geschrieben:
> Hi,
> 
> My target format is a Persistent Disk on GCP.
> https://cloud.google.com/persistent-disk
> 
> And my use case is converting VMDKs to PDs so I'm just using qemu-img
> for the conversion (not using qemu as a hypervisor).
> 
> Luckily PDs are zeroed out when allocated but I was asking to
> understand the restrictions of qemu-img convert.
> 
> It could be useful for qemu-img convert to not zero out the disk, but
> do write allocated zeroes, I'm imagining cloud scenarios where instead
> of virtual disks the customer receives an attached physical SSD device
> that is not zeroed out beforehand (only encryption key changed, for
> privacy/security sake) so reads will return garbage.

But that's the default mode? Zeroing out the whole disk upfront is an
optimisation that we do if efficient zeroing is possible, but if we
can't, we just write explicit zeros where needed.

--target-is-zero means that you promise that the target is already
pre-zeroed so qemu-img can further optimise things. If you specify it
and the target doesn't contain zeros, but random data, you get garbage.

Kevin



  reply	other threads:[~2020-06-10 11:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10  5:28 Clarification regarding new qemu-img convert --target-is-zero flag Sam Eiderman
2020-06-10  6:16 ` Vladimir Sementsov-Ogievskiy
2020-06-10  6:28   ` Sam Eiderman
2020-06-10 11:37     ` Kevin Wolf [this message]
2020-06-10 11:52       ` Sam Eiderman
2020-06-10 11:56 ` David Edmondson
2020-06-10 12:19   ` Sam Eiderman
2020-06-10 13:36     ` Vladimir Sementsov-Ogievskiy
2020-06-10 14:06     ` Kevin Wolf
2020-06-10 15:26       ` Sam Eiderman
2020-06-10 15:29         ` Sam Eiderman
2020-06-10 15:42           ` David Edmondson
2020-06-10 15:47             ` Sam Eiderman
2020-06-10 15:48             ` Eric Blake
2020-06-10 15:57               ` David Edmondson
2020-06-10 16:21                 ` Eric Blake
2020-06-11 10:58                   ` David Edmondson
2020-06-10 16:31         ` Kevin Wolf
2020-06-11 13:41           ` Sam Eiderman

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=20200610113742.GC6947@linux.fritz.box \
    --to=kwolf@redhat.com \
    --cc=david.edmondson@oracle.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sameid@google.com \
    --cc=tzz@google.com \
    --cc=vsementsov@virtuozzo.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).