-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cleanup.py): bad live coalesce check regarding FileSR
The `VDI.canLiveCoalesce` method can manipulates sizes of different units because of this change: ``` CP-40871: use VHD allocation size in checking canLiveCoalesce 2f863b9 ``` As a result, the `canLiveCoalesce` method can return `True` and cause coalesce attempts resulting in "Timed out" exceptions. * Only drivers deriving from `FileSR` are impacted. * The size of `self._sizeAllocated` is calculated correctly when `vhdutil.getAllocatedSize` is called but there is a problematic case where `getVHDInfo` is used instead. And this function does not convert `info.sizeAllocated` from block size to bytes. * Additionally, the getter `getAllocatedSize` should retrieve the allocated size if it's equal to -1. Otherwise `VDI.canLiveCoalesce` can compare -1 to a positive value and would always return `True` causing a `Timed out` error error... Signed-off-by: Damien Thenot <[email protected]> Co-authored-by: Ronan Abhamon <[email protected]>
- Loading branch information
1 parent
d160bfb
commit 5398c7a
Showing
4 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters