[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [sheepdog] [PATCH v4] sheepdog: fix loadvm operation
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [sheepdog] [PATCH v4] sheepdog: fix loadvm operation |
Date: |
Fri, 26 Apr 2013 13:39:43 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Apr 26, 2013 at 05:04:06PM +0800, Liu Yuan wrote:
> On 04/25/2013 09:06 PM, MORITA Kazutaka wrote:
> > At Thu, 25 Apr 2013 20:49:39 +0800,
> > Liu Yuan wrote:
> >>
> >> From: Liu Yuan <address@hidden>
> >>
> >> Currently the 'loadvm' opertaion works as following:
> >> 1. switch to the snapshot
> >> 2. mark current working VDI as a snapshot
> >> 3. rely on sd_create_branch to create a new working VDI based on the
> >> snapshot
> >>
> >> This works not the same as other format as QCOW2. For e.g,
> >>
> >> qemu > savevm # get a live snapshot snap1
> >> qemu > savevm # snap2
> >> qemu > loadvm 1 # This will steally create snap3 of the working VDI
> >>
> >> Which will result in following snapshot chain:
> >>
> >> base <-- snap1 <-- snap2 <-- snap3
> >> ^
> >> |
> >> working VDI
> >>
> >> snap3 was unnecessarily created and might be annoying users.
> >>
> >> This patch discard the unnecessary 'snap3' creation. and implement
> >> rollback(loadvm) operation to the specified snapshot by
> >> 1. switch to the snapshot
> >> 2. delete working VDI
> >> 3. rely on sd_create_branch to create a new working VDI based on the
> >> snapshot
> >>
> >> The snapshot chain for above example will be:
> >>
> >> base <-- snap1 <-- snap2
> >> ^
> >> |
> >> working VDI
> >>
> >> Cc: address@hidden
> >> Cc: MORITA Kazutaka <address@hidden>
> >> Cc: Kevin Wolf <address@hidden>
> >> Cc: Stefan Hajnoczi <address@hidden>
> >> Signed-off-by: Liu Yuan <address@hidden>
> >> ---
> >> v4:
> >> - print an error message when NO_VDI found
> >>
> >> v3:
> >> - let boot from snapshot behave like 'loadvm'
> >>
> >> v2:
> >> - use do_req() because sd_delete isn't in coroutine
> >> - don't break old behavior if we boot up on the snapshot by using
> >> s->reverted
> >> to indicate if we delete working VDI successfully
> >> - fix a subtle case that sd_create_branch() isn't called yet while another
> >> 'loadvm' is executed
> >>
> >> block/sheepdog.c | 54
> >> +++++++++++++++++++++++++++++++++++++++++++++++++++++-
> >> 1 file changed, 53 insertions(+), 1 deletion(-)
> >
> > Reviewed-by: MORITA Kazutaka <address@hidden>
>
> Missed this one, Stefan?
Please send patches as top-level email threads instead of replies so
that they get noticed.
Thanks,
Stefan
- Re: [Qemu-devel] [sheepdog] [PATCH v2] sheepdog: fix loadvm operation, (continued)
[Qemu-devel] [PATCH v4] sheepdog: fix loadvm operation, Liu Yuan, 2013/04/25
Re: [Qemu-devel] [PATCH v4] sheepdog: fix loadvm operation, Stefan Hajnoczi, 2013/04/26