Change in vdsm[master]: Create destination image as preallocated only if format is RAW

Federico Simoncelli fsimonce at redhat.com
Wed Apr 30 11:07:20 UTC 2014


Federico Simoncelli has posted comments on this change.

Change subject: Create destination image as preallocated only if format is RAW
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/27244/1/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 \
"not" instead of "!" is preferred by python guys. Also using parenthesis (instead of "\") would be better:

 if (not destDom.supportsSparseness
     and volParams['volFormat'] == volume.RAW_FORMAT):
     ...
Line 362:                             and volParams['volFormat'] == volume.RAW_FORMAT:
Line 363:                         tmpVolPreallocation = volume.PREALLOCATED_VOL
Line 364:                     else:
Line 365:                         tmpVolPreallocation = volume.SPARSE_VOL


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I209bae70252a52f8a66be42a718c3dd73f2a6bd3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list