cbb4d22 qemu: snapshot: Refactor snapshot rollback on failure

Authored and Committed by Peter Krempa 7 years ago
    qemu: snapshot: Refactor snapshot rollback on failure
    
    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.
    
        
file modified
+203 -149