qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: kwolf@redhat.com, obarenbo@redhat.com, armbru@redhat.com,
	roliveri@redhat.com, hbrock@redhat.com, qemu-devel@nongnu.org,
	rjones@redhat.com, pmyers@redhat.com, imain@redhat.com,
	stefanha@redhat.com
Subject: Re: [Qemu-devel] [RFC PATCH 0/3] Point-in-time snapshot exporting with drive-backup
Date: Wed, 26 Jun 2013 09:23:40 +0200	[thread overview]
Message-ID: <51CA96FC.1090907@redhat.com> (raw)
In-Reply-To: <1372219161-12209-1-git-send-email-famz@redhat.com>

Il 26/06/2013 05:59, Fam Zheng ha scritto:
> 
> The block job originally had total control over target bs: when the job
> completes, the target is deleted. Now it's shared with NBD, so we should make
> sure the job completion or canceling wouldn't crash NBD server. This patch
> doesn't handle this case: if the block job is ended before NBD exporting,
> there'll be problem.

This should not be a problem.  When the job completes or cancels it will
close s->target.  The NBD server has installed a close notifier for
s->target, and will close connections with the clients.

Similarly, if the source disk is hot-unplugged, the bdrv_close will
cancel the job, which in turn closes connections with the clients.

So this just works as long as no hot-unplug happens and as long as the
job doesn't complete: the client can use the point-in-time snapshot via
NBD as long as it cares to.

This leads to another observation: a sync:'none' block-backup job
probably should never complete, and should instead go on until explicit
cancellation.  This is because the job does no background writes, and
thus completion would only happen after the guest has written the whole
disk.  Writing the whole disk is rare enough that it will likely cause
bugs in the clients.  It is easier just to never complete the job.

Paolo

  parent reply	other threads:[~2013-06-26  7:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-26  3:59 [Qemu-devel] [RFC PATCH 0/3] Point-in-time snapshot exporting with drive-backup Fam Zheng
2013-06-26  3:59 ` [Qemu-devel] [RFC PATCH 1/3] block: add target-id option to drive-backup QMP command Fam Zheng
2013-06-27  8:15   ` Stefan Hajnoczi
2013-06-27  9:41     ` Fam Zheng
2013-06-27 10:57       ` Paolo Bonzini
2013-06-27 11:37         ` Fam Zheng
2013-06-27 11:40           ` Paolo Bonzini
2013-06-28  2:17             ` Fam Zheng
2013-06-26  3:59 ` [Qemu-devel] [RFC PATCH 2/3] block: assign backing relationship in drive-backup Fam Zheng
2013-06-26  7:15   ` Paolo Bonzini
2013-06-26  3:59 ` [Qemu-devel] [RFC PATCH 3/3] nbd: don't get ref if bs has no drive Fam Zheng
2013-06-26  7:23 ` Paolo Bonzini [this message]
2013-06-26  7:31   ` [Qemu-devel] [RFC PATCH 0/3] Point-in-time snapshot exporting with drive-backup Fam Zheng
2013-06-27  8:17     ` Stefan Hajnoczi
2013-06-27 10:06       ` Paolo Bonzini
2013-06-27 13:39         ` Stefan Hajnoczi

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=51CA96FC.1090907@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=famz@redhat.com \
    --cc=hbrock@redhat.com \
    --cc=imain@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=obarenbo@redhat.com \
    --cc=pmyers@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    --cc=roliveri@redhat.com \
    --cc=stefanha@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 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).