qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Haoyu <ahzhanghaoyu@gmail.com>
To: Kevin Wolf <kwolf@redhat.com>, Zhang Haoyu <zhanghy@sangfor.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [question] savevm/delvm: Is it necessary to perform bdrv_drain_all before savevm and delvm?
Date: Mon, 20 Oct 2014 23:09:30 +0800	[thread overview]
Message-ID: <544525AA.6030609@gmail.com> (raw)
In-Reply-To: <20141020135955.GL3585@noname.redhat.com>

 >> Hi,
 >>
 >> I noticed that bdrv_drain_all is performed in load_vmstate before 
bdrv_snapshot_goto,
 >> and bdrv_drain_all is performed in qmp_transaction before 
internal_snapshot_prepare,
 >> so is it also neccesary to perform bdrv_drain_all in savevm and delvm?
 >
 >Definitely yes for savevm. do_savevm() calls it indirectly via
 >vm_stop(), so that part looks okay.
 >
Yes, you are right.

 >delvm doesn't affect the currently running VM, and therefore doesn't
 >interfere with guest requests that are in flight. So I think that a
 >bdrv_drain_all() isn't needed there.
 >
I'm worried about that there are still pending IOs while deleting snapshot,
then is it possible that there is concurrency problem between the 
process of deleting snapshot
and the coroutine of io read/write(bdrv_co_do_rw) invoked by the pending 
IOs?
This coroutine is also in main thread.
Am I missing something?

Thanks,
Zhang Haoyu

 >Kevin

  reply	other threads:[~2014-10-20 15:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 13:48 [Qemu-devel] [question] savevm/delvm: Is it neccesary to perform bdrv_drain_all before savevm and delvm? Zhang Haoyu
2014-10-20 13:59 ` Kevin Wolf
2014-10-20 15:09   ` Zhang Haoyu [this message]
2014-10-20 16:07     ` [Qemu-devel] [question] savevm/delvm: Is it necessary " Kevin Wolf
2014-10-21  1:13       ` Zhang Haoyu
2014-10-21  7:19         ` Kevin Wolf
2014-10-21  7:51           ` [Qemu-devel] [question] savevm/delvm: Is it necessary to performbdrv_drain_all " Zhang Haoyu

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=544525AA.6030609@gmail.com \
    --to=ahzhanghaoyu@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=zhanghy@sangfor.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).