All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Avi Kivity <avi@redhat.com>
Cc: dlaor@redhat.com, Chris Wright <chrisw@sous-sol.org>,
	Juan Quintela <quintela@redhat.com>,
	chrisw@redhat.com,
	"Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org,
	Ayal Baron <abaron@redhat.com>
Subject: Re: [Qemu-devel] Re: KVM call agenda for Oct 19
Date: Tue, 19 Oct 2010 08:33:33 -0500	[thread overview]
Message-ID: <4CBD9E2D.6030208@codemonkey.ws> (raw)
In-Reply-To: <4CBD9CB3.5080609@redhat.com>

On 10/19/2010 08:27 AM, Avi Kivity wrote:
>  On 10/19/2010 03:22 PM, Anthony Liguori wrote:
>>
>> I had assumed that this would involve:
>>
>> qemu -hda windows.img
>>
>> (qemu) snapshot ide0-disk0 snap0.img
>>
>> 1) create snap0.img internally by doing the equivalent of `qemu-img 
>> create -f qcow2 -b windows.img snap0.img'
>> 2) bdrv_flush('ide0-disk0')
>> 3) bdrv_open(snap0.img)
>> 4) bdrv_close(windows.img)
>> 5) rename('windows.img', 'windows.img.tmp')
>> 6) rename('snap0.img', 'windows.img')
>> 7) rename('windows.img.tmp', 'snap0.img')
>>
>
> Looks reasonable.
>
> Would be interesting to look at this as a use case for the threading 
> work.  We should eventually be able to create a snapshot without 
> stalling vcpus (stalling I/O of course allowed).

If we had another block-level command, like bdrv_aio_freeze(), that 
queued all pending requests until the given callback completed, it would 
be very easy to do this entirely asynchronously.  For instance:

bdrv_aio_freeze(create_snapshot)

create_snapshot():
   bdrv_aio_flush(done_flush)

done_flush():
   bdrv_open(...)
   bdrv_close(...)
   ...

Of course, closing a device while it's being frozen is probably a recipe 
for disaster but you get the idea :-)

Regards,

Anthony Liguori



WARNING: multiple messages have this Message-ID (diff)
From: Anthony Liguori <anthony@codemonkey.ws>
To: Avi Kivity <avi@redhat.com>
Cc: chrisw@redhat.com, kvm@vger.kernel.org,
	Juan Quintela <quintela@redhat.com>,
	dlaor@redhat.com, qemu-devel@nongnu.org,
	Chris Wright <chrisw@sous-sol.org>,
	Ayal Baron <abaron@redhat.com>,
	"Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] Re: KVM call agenda for Oct 19
Date: Tue, 19 Oct 2010 08:33:33 -0500	[thread overview]
Message-ID: <4CBD9E2D.6030208@codemonkey.ws> (raw)
In-Reply-To: <4CBD9CB3.5080609@redhat.com>

On 10/19/2010 08:27 AM, Avi Kivity wrote:
>  On 10/19/2010 03:22 PM, Anthony Liguori wrote:
>>
>> I had assumed that this would involve:
>>
>> qemu -hda windows.img
>>
>> (qemu) snapshot ide0-disk0 snap0.img
>>
>> 1) create snap0.img internally by doing the equivalent of `qemu-img 
>> create -f qcow2 -b windows.img snap0.img'
>> 2) bdrv_flush('ide0-disk0')
>> 3) bdrv_open(snap0.img)
>> 4) bdrv_close(windows.img)
>> 5) rename('windows.img', 'windows.img.tmp')
>> 6) rename('snap0.img', 'windows.img')
>> 7) rename('windows.img.tmp', 'snap0.img')
>>
>
> Looks reasonable.
>
> Would be interesting to look at this as a use case for the threading 
> work.  We should eventually be able to create a snapshot without 
> stalling vcpus (stalling I/O of course allowed).

If we had another block-level command, like bdrv_aio_freeze(), that 
queued all pending requests until the given callback completed, it would 
be very easy to do this entirely asynchronously.  For instance:

bdrv_aio_freeze(create_snapshot)

create_snapshot():
   bdrv_aio_flush(done_flush)

done_flush():
   bdrv_open(...)
   bdrv_close(...)
   ...

Of course, closing a device while it's being frozen is probably a recipe 
for disaster but you get the idea :-)

Regards,

Anthony Liguori

  reply	other threads:[~2010-10-19 13:33 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-18 15:43 KVM call agenda for Oct 19 Juan Quintela
2010-10-18 15:43 ` [Qemu-devel] " Juan Quintela
2010-10-19  2:11 ` Chris Wright
2010-10-19  2:11   ` [Qemu-devel] " Chris Wright
2010-10-19 12:48   ` Dor Laor
2010-10-19 12:48     ` Dor Laor
2010-10-19 12:55     ` Avi Kivity
2010-10-19 12:55       ` Avi Kivity
2010-10-19 12:58       ` Dor Laor
2010-10-19 12:58         ` Dor Laor
2010-10-19 13:03         ` Avi Kivity
2010-10-19 13:03           ` Avi Kivity
2010-10-19 13:18           ` Anthony Liguori
2010-10-19 13:18             ` Anthony Liguori
2010-10-19 13:22     ` Anthony Liguori
2010-10-19 13:22       ` Anthony Liguori
2010-10-19 13:27       ` Avi Kivity
2010-10-19 13:27         ` Avi Kivity
2010-10-19 13:33         ` Anthony Liguori [this message]
2010-10-19 13:33           ` Anthony Liguori
2010-10-19 13:38           ` Stefan Hajnoczi
2010-10-19 13:38             ` Stefan Hajnoczi
2010-10-19 13:55             ` Avi Kivity
2010-10-19 13:55               ` Avi Kivity
2010-10-19 13:28     ` Anthony Liguori
2010-10-19 13:28       ` Anthony Liguori
     [not found] <314565543.45891287507100965.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com>
2010-10-19 16:54 ` Ayal Baron
2010-10-19 16:54   ` Ayal Baron
2010-10-19 17:09   ` Anthony Liguori
2010-10-19 17:09     ` Anthony Liguori
2010-10-20  9:18     ` Kevin Wolf
2010-10-20  9:18       ` Kevin Wolf
2010-10-20  9:41       ` Ayal Baron
2010-10-20  9:41         ` Ayal Baron
2010-10-20 13:05       ` Anthony Liguori
2010-10-20 13:05         ` Anthony Liguori
     [not found] <512838278.79671287521779658.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com>
2010-10-19 20:57 ` Ayal Baron
2010-10-19 20:57   ` Ayal Baron
2010-10-19 21:19   ` Anthony Liguori
2010-10-19 21:19     ` Anthony Liguori

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=4CBD9E2D.6030208@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=abaron@redhat.com \
    --cc=avi@redhat.com \
    --cc=chrisw@redhat.com \
    --cc=chrisw@sous-sol.org \
    --cc=dlaor@redhat.com \
    --cc=jvrao@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.