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?
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;
}