Federico Simoncelli has posted comments on this change.

Change subject: sparsify: integrating virt-sparsify into vdsm
......................................................................


Patch Set 14:

(1 comment)

http://gerrit.ovirt.org/#/c/28328/14/vdsm/storage/image.py
File vdsm/storage/image.py:

Line 558:         try:
Line 559:             dstVolume.prepare()
Line 560:             try:
Line 561:                 # TODO: Some extra space may be needed for QCOW2 
headers
Line 562:                 tmpVolume.extend(tmpVolume.getSize())
> So to sparsify a volume of size X, we need a temporary volume of size X, an
By definition "sparsification" is implemented writing a file with zeroes as 
large as the entire file-system. So at least tmpVolume needs to be as large as 
the virtual disk size for the worst case.

For the dstVolume we may think of an optimization where the extension is as 
large as the source (and at the end we shrinkToOptimalSize). This requires some 
thoughts anyway.

Let's go ahead as it is and let's add a TODO. If I am not mistaken the future 
code may look like (I always get confused with units bytes/sectors):

 dstVolume.extend(srcVolume.getVolumeSize(bs=1))
Line 563:                 dstVolume.extend(tmpVolume.getSize())
Line 564: 
Line 565:                 srcFormat = volume.fmt2str(srcVolume.getFormat())
Line 566:                 dstFormat = volume.fmt2str(dstVolume.getFormat())


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id7bd2b4b6d45781fa27a128dd68d14b7561d0901
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Utkarsh Singh <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Utkarsh Singh <[email protected]>
Gerrit-Reviewer: [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