qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 0/3] Point-in-time snapshot exporting with d


From: Paolo Bonzini
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]