From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Qemu-block <qemu-block@nongnu.org>, Max Reitz <mreitz@redhat.com>
Subject: Re: qcow2: Zero-initialization of external data files
Date: Tue, 14 Apr 2020 14:28:48 +0200 [thread overview]
Message-ID: <20200414122848.GC7747@linux.fritz.box> (raw)
In-Reply-To: <cc17fee7-3349-063c-3531-f6239676dc50@redhat.com>
Am 09.04.2020 um 16:32 hat Eric Blake geschrieben:
> On 4/9/20 9:10 AM, Max Reitz wrote:
>
> > >
> > > What happens when an operation attempts to unmap things? Do we reject
> > > all unmap operations when data-file-raw is set (thus leaving a cluster
> > > marked as allocated at all times, if we can first guarantee that
> > > preallocation set things up that way)?
> > No, unmap operations currently work. qcow2_free_any_clusters() passes
> > them through to the external data file.
> >
> > The problem is that the unmap also zeroes the L2 entry, so if you then
> > write data to the raw file, it won’t be visible from the qcow2 side of
> > things. However, I’m not sure whether we support modifications of a raw
> > file when it is already “in use” by a qcow2 image, so maybe that’s fine.
>
> We don't support concurrent modification. But if the guest is running and
> unmaps things, then shuts off, then we edit the raw file offline, then we
> restart the guest, the guest should see the results of those offline edits.
If you write to the external data file other than through qcow2, you
have invalidated the qcow2 layer. You can only use the image as a raw
image after this.
There is no point in bending over backwards in qcow2 to allow something
like this. If you're not interested in valid metadata, but want to
ignore all of it, you can just use raw from the start.
Kevin
prev parent reply other threads:[~2020-04-14 12:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-17 16:56 qcow2: Zero-initialization of external data files Max Reitz
2020-04-06 22:22 ` Eric Blake
2020-04-09 13:05 ` Max Reitz
2020-04-09 13:42 ` Eric Blake
2020-04-09 13:47 ` Eric Blake
2020-04-09 14:10 ` Max Reitz
2020-04-09 14:32 ` Eric Blake
2020-04-09 15:01 ` Max Reitz
2020-04-09 15:46 ` Eric Blake
2020-04-09 15:56 ` Eric Blake
2020-04-14 12:34 ` Kevin Wolf
2020-04-14 12:28 ` Kevin Wolf [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=20200414122848.GC7747@linux.fritz.box \
--to=kwolf@redhat.com \
--cc=eblake@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--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).