Federico Simoncelli has posted comments on this change.

Change subject: Allow moving of sparse images to a block domains
......................................................................


Patch Set 5:

(2 comments)

http://gerrit.ovirt.org/#/c/25778/5/vdsm/storage/image.py
File vdsm/storage/image.py:

Line 357:                     # To avoid prezeroing preallocated volumes on NFS 
domains
Line 358:                     # we create the target as a sparse volume (since 
it will be
Line 359:                     # soon filled with the data coming from the copy) 
and then
Line 360:                     # we change its metadata back to the original 
value.
Line 361:                     if (destDom.supportsSparseness):
No need for parentheses.
Line 362:                         tmpVolPreallocation = volume.SPARSE_VOL
Line 363:                     else:
Line 364:                         tmpVolPreallocation = volume.PREALLOCATED_VOL
Line 365: 


Line 382:                     # Change destination volume metadata back to the 
original
Line 383:                     # type unless the domain does not supports 
sparseness, in
Line 384:                     # that case leave it as preallocated
Line 385:                     if tmpVolPreallocation != volParams['prealloc'] 
and \
Line 386:                             destDom.supportsSparseness:
I think it should be:

 if (volParams['prealloc'] == volume.PREALLOCATED_VOL
         and tmpVolPreallocation != volume.PREALLOCATED_VOL):
     dstVol.setType(volume.PREALLOCATED_VOL)
Line 387:                         dstVol.setType(volParams['prealloc'])
Line 388: 
Line 389:                     dstChain.append(dstVol)
Line 390:                 except se.StorageException:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id95d700cf6acb46464d6c5d063966f9331a15028
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Tal Nisan <[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