Change in vdsm[master]: vm: improve extension check in extendDrivesIfNeeded
abaron at redhat.com
abaron at redhat.com
Wed Nov 20 07:15:44 UTC 2013
Ayal Baron has posted comments on this change.
Change subject: vm: improve extension check in extendDrivesIfNeeded
......................................................................
Patch Set 1:
(3 comments)
....................................................
Commit Message
Line 3: AuthorDate: 2013-11-14 09:08:08 -0500
Line 4: Commit: Federico Simoncelli <fsimonce at redhat.com>
Line 5: CommitDate: 2013-11-19 10:38:09 -0500
Line 6:
Line 7: vm: improve extension check in extendDrivesIfNeeded
improve how? why?
Line 8:
Line 9: Change-Id: Ide5034cd5d87451c06a2ba034011fdf5696440e6
....................................................
File vdsm/vm.py
Line 2299: # When an extension is needed we compute the maxium allowed size
Line 2300: # taking in account the qcow2 format overhead and rounding it up
Line 2301: # to the next volume chunk.
Line 2302: extChunkBytes = drive.VOLWM_CHUNK_MB * constants.MEGAB
Line 2303: totAlloc = capacity * (1.0 + QCOW2_OVERHEAD)
Same result but possibly more legible?
overhead = capacity * QCOW2_OVERHEAD
totAlloc = capacity + overhead
(I think this makes the part in the comment about the overhead redundant)
Line 2304: maxAlloc = (
Line 2305: int((totAlloc + extChunkBytes - 1) / extChunkBytes) *
Line 2306: extChunkBytes
Line 2307: )
Line 2307: )
Line 2308:
Line 2309: # NOTE: the intent of this check is to prevent faulty images to
Line 2310: # trick qemu in requesting extremely large extensions (BZ#998443).
Line 2311: if curAlloc > maxAlloc:
1. Meaning this patch cannot go in? so -1 its verification or something?
2. Assuming (1) is correct then we will only be able to accept this patch if we have a way to fix existing volumes (reclaim leaked clusters)
Line 2312: self.log.error(
Line 2313: "Improbable extension request for volume %s on domain "
Line 2314: "%s, pausing the VM to avoid corruptions (capacity: %s, "
Line 2315: "allocated: %s, physical: %s, max allocation: %s)",
--
To view, visit http://gerrit.ovirt.org/21423
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ide5034cd5d87451c06a2ba034011fdf5696440e6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list