From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
Kevin Wolf <kwolf@redhat.com>,
Denis Plotnikov <dplotnikov@virtuozzo.com>
Cc: qemu-block@nongnu.org, armbru@redhat.com, s.reiter@proxmox.com,
qemu-devel@nongnu.org, mreitz@redhat.com, stefanha@redhat.com,
Thomas Lamprecht <t.lamprecht@proxmox.com>
Subject: Re: [RFC PATCH 0/3] block: Synchronous bdrv_*() from coroutine in different AioContext
Date: Tue, 19 May 2020 11:06:00 -0500 [thread overview]
Message-ID: <8f454324-2edc-076f-c413-04c74ffaf6b9@redhat.com> (raw)
In-Reply-To: <b10dddf4-8889-c9e2-74db-d620e4fa5ca7@virtuozzo.com>
On 5/19/20 10:48 AM, Vladimir Sementsov-Ogievskiy wrote:
>> The other options is doing what you suggested. There is nothing in the
>> qcow2 on-disk format that would prevent this, but we would have to
>> extend the qcow2 driver to allow I/O to inactive L1 tables. This sounds
>> like a non-trivial amount of code changes, though it would potentially
>> enable more use cases we never implemented ((read-only) access to
>> internal snapshots as block nodes, so you could e.g. use block jobs to
>> export a snapshot).
>
> Or export a snapshot through NBD.
>
> Still, I have one more idea, probably we already discussed it?
> Honestly, I don't like the fact that we store vmstate into guest-data
> space. After EOF, invisible, but still..
>
> Maybe, it would be good to make a qcow2 extension for storing vmstate
> separately?
The existing location of internal snapshots IS already stored separately
from guest-data space, precisely because it is beyond EOF.
> So snapshot metadata will include two more fields:
> vmstate_offset and vmstate_length (hmm, actually we already have the
> second one), which will be allocated as normal qcow2 metadata?
How will adding redundant fields help? Both fields are already present
in the snapshot table of v3 images (even if indirectly) by virtue of:
32 - 35: Size of the VM state in bytes. 0 if no VM state is
saved.
If there is VM state, it starts at the first cluster
described by first L1 table entry that doesn't
describe a
regular guest cluster (i.e. VM state is stored like
guest
disk content, except that it is stored at offsets
that are
larger than the virtual disk presented to the guest)
Byte 40 - 47: Size of the VM state in bytes. 0 if
no VM
state is saved. If this field is
present,
the 32-bit value in bytes 32-35 is
ignored.
Byte 48 - 55: Virtual disk size of the snapshot
in bytes
which gives you both the 64-bit size (in order to compute the last
cluster accessible to the guest, and thus the next cluster available to
the vmstate beyond EOF) and the 64-bit length of that vmstate.
> Or we can
> add one-two levels of layered allocation if needed, but keep it separate
> from L1/L2 tables for guest clusters.
>
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2020-05-19 16:07 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 14:43 [RFC PATCH 0/3] block: Synchronous bdrv_*() from coroutine in different AioContext Kevin Wolf
2020-05-12 14:43 ` [RFC PATCH 1/3] block: Factor out bdrv_run_co() Kevin Wolf
2020-05-12 15:37 ` Eric Blake
2020-05-20 9:09 ` Philippe Mathieu-Daudé
2020-05-20 11:14 ` Vladimir Sementsov-Ogievskiy
2020-05-12 14:43 ` [RFC PATCH 2/3] block: Allow bdrv_run_co() from different AioContext Kevin Wolf
2020-05-12 16:02 ` Thomas Lamprecht
2020-05-12 19:29 ` Kevin Wolf
2020-05-25 14:18 ` Stefan Reiter
2020-05-25 16:41 ` Kevin Wolf
2020-05-26 16:42 ` Kevin Wolf
2020-05-27 8:56 ` Stefan Reiter
2020-05-12 14:43 ` [RFC PATCH 3/3] block: Assert we're running in the right thread Kevin Wolf
2020-05-14 13:52 ` Stefan Reiter
2020-05-14 14:30 ` Kevin Wolf
2020-05-20 9:12 ` Philippe Mathieu-Daudé
2020-05-14 13:21 ` [RFC PATCH 0/3] block: Synchronous bdrv_*() from coroutine in different AioContext Thomas Lamprecht
2020-05-14 14:26 ` Kevin Wolf
2020-05-19 12:32 ` Vladimir Sementsov-Ogievskiy
2020-05-19 13:54 ` Denis Plotnikov
2020-05-19 14:18 ` Kevin Wolf
2020-05-19 15:05 ` Denis Plotnikov
2020-05-19 15:29 ` Kevin Wolf
2020-05-19 15:48 ` Vladimir Sementsov-Ogievskiy
2020-05-19 16:06 ` Eric Blake [this message]
2020-05-20 7:23 ` Denis Plotnikov
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=8f454324-2edc-076f-c413-04c74ffaf6b9@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=dplotnikov@virtuozzo.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=s.reiter@proxmox.com \
--cc=stefanha@redhat.com \
--cc=t.lamprecht@proxmox.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).