Change in vdsm[master]: image: Remove redundant activate and deactivate of the same ...

ykaplan at redhat.com ykaplan at redhat.com
Thu Oct 3 17:15:02 UTC 2013


Yeela Kaplan has uploaded a new change for review.

Change subject: image: Remove redundant activate and deactivate of the same volume
......................................................................

image: Remove redundant activate and deactivate of the same volume

Change-Id: I3d615fd8e9b199cef1340360c7f68b19919b0caa
Signed-off-by: Yeela Kaplan <ykaplan at redhat.com>
---
M vdsm/storage/image.py
1 file changed, 2 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/19854/1

diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index da3e42d..e9c6a34 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -929,11 +929,7 @@
                                           newUUID)
             srcVol.rebase(newUUID, backingVolPath, volParams['volFormat'],
                           unsafe=False, rollback=True)
-        finally:
-            srcVol.teardown(sdUUID=srcVol.sdUUID, volUUID=srcVol.volUUID)
 
-        srcVol.prepare(rw=True, chainrw=True, setrw=True)
-        try:
             # Step 3: Remove pointer to backing file from the successor by
             #         'unsafed' rebase qemu-img rebase -u -b "" -F
             #         backingFormat -f srcFormat src
@@ -941,10 +937,10 @@
                           unsafe=True, rollback=False)
         finally:
             srcVol.teardown(sdUUID=srcVol.sdUUID, volUUID=srcVol.volUUID)
+            tmpVol.teardown(sdUUID=tmpVol.sdUUID, volUUID=tmpVol.volUUID,
+                            justme=True)
 
         # Step 4: Delete temporary volume
-        tmpVol.teardown(sdUUID=tmpVol.sdUUID, volUUID=tmpVol.volUUID,
-                        justme=True)
         tmpVol.delete(postZero=False, force=True)
 
         # Prepare chain for future erase


-- 
To view, visit http://gerrit.ovirt.org/19854
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d615fd8e9b199cef1340360c7f68b19919b0caa
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan at redhat.com>


More information about the vdsm-patches mailing list