提交 4f3287a4 编写于 作者: Z Zeeshan Ali (Khattak) 提交者: Eric Blake

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?
上级 d1c31023
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册