mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-30 21:47:18 +00:00
Correct a check for capacity arg of storageVolumeResize()
Lets say I got a volume with '1G' allocation and '10G' capacity. The available space in the parent pool is '5G'. With the current check for overcapacity, I can only try to resize to <= '6G'. You see the problem?
This commit is contained in:
parent
d1c310231d
commit
4f3287a415
@ -1758,8 +1758,8 @@ storageVolumeResize(virStorageVolPtr obj,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (abs_capacity > vol->allocation + pool->def->available) {
|
||||
virStorageReportError(VIR_ERR_INVALID_ARG,
|
||||
if (abs_capacity > vol->capacity + pool->def->available) {
|
||||
virStorageReportError(VIR_ERR_OPERATION_FAILED,
|
||||
_("Not enough space left on storage pool"));
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user