mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (abs_capacity > vol->allocation + pool->def->available) {
|
if (abs_capacity > vol->capacity + pool->def->available) {
|
||||||
virStorageReportError(VIR_ERR_INVALID_ARG,
|
virStorageReportError(VIR_ERR_OPERATION_FAILED,
|
||||||
_("Not enough space left on storage pool"));
|
_("Not enough space left on storage pool"));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user