Re: [libvirt] [PATCH 4/6] qemu: snapshot: Refactor snapshot rollback on failure

2017-01-10 Thread Peter Krempa
On Sat, Jan 07, 2017 at 13:37:12 -0500, John Ferlan wrote: > > > On 12/16/2016 11:24 AM, Peter Krempa wrote: > > The code at first changed the definition and then rolled it back in case > > of failure. This was ridiculous. Refactor the code so that the image in > > the definition is changed only

Re: [libvirt] [PATCH 4/6] qemu: snapshot: Refactor snapshot rollback on failure

2017-01-07 Thread John Ferlan
On 12/16/2016 11:24 AM, Peter Krempa wrote: > The code at first changed the definition and then rolled it back in case > of failure. This was ridiculous. Refactor the code so that the image in > the definition is changed only when the snapshot is successful. > > The refactor will also simplify

[libvirt] [PATCH 4/6] qemu: snapshot: Refactor snapshot rollback on failure

2016-12-16 Thread Peter Krempa
The code at first changed the definition and then rolled it back in case of failure. This was ridiculous. Refactor the code so that the image in the definition is changed only when the snapshot is successful. The refactor will also simplify further fix of image locking when doing snapshots. ---