Federico Simoncelli has posted comments on this change.

Change subject: Remove redundant check that causes lvm cache to refresh every 
volume creation
......................................................................


Patch Set 1:

(3 comments)

....................................................
File vdsm/storage/volume.py
Line 397:             'preallocate' - Preallocate / Sparse
Line 398:             'diskType' - enum (API.Image.DiskTypes)
Line 399:             'srcImgUUID' - source image UUID
Line 400:             'srcVolUUID' - source volume UUID
Line 401:         """
Nice, we finally get rid of these. It was on my todo list since a long time!
Line 402:         cls.validateCreateVolumeParams(volFormat, preallocate, 
srcVolUUID)
Line 403: 
Line 404:         dom = sdCache.produce(sdUUID)
Line 405:         imgPath = image.Image(repoPath).create(sdUUID, imgUUID)


Line 401:         """
Line 402:         cls.validateCreateVolumeParams(volFormat, preallocate, 
srcVolUUID)
Line 403: 
Line 404:         dom = sdCache.produce(sdUUID)
Line 405:         imgPath = image.Image(repoPath).create(sdUUID, imgUUID)
Removing the volumeExists check might be safe on block domains but what about 
file domains? It looks to me that this wouldn't prevent you from (partially or 
completely)  wiping an existing volume.
Line 406: 
Line 407:         volPath = os.path.join(imgPath, volUUID)
Line 408:         volParent = None
Line 409:         volType = type2name(LEAF_VOL)


Line 420:                     srcImgUUID = imgUUID
Line 421: 
Line 422:                 volParent = cls(repoPath, sdUUID, srcImgUUID, 
srcVolUUID)
Line 423:                 # Override the size with the size of the parent
Line 424:                 size = volParent.getSize()
Any reason to move this?
Line 425: 
Line 426:                 if imgUUID != srcImgUUID:
Line 427:                     volParent.share(imgPath)
Line 428:                     volParent = cls(repoPath, sdUUID, imgUUID, 
srcVolUUID)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib6f3b6ca8313070d0345b5f76ebb0b3d9772d14f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to