提交 9508682b 编写于 作者: J John Ferlan

storage: Allow probe of volume capacity for BLOCK type

If the voldef type is VIR_STORAGE_VOL_BLOCK, then as long as the
format is known, let's allow the probe to happen - gets a truer value
and the same probe/update would be allowed for the same volume defined
in a domain.
上级 d04bb05f
...@@ -1900,7 +1900,7 @@ virStorageBackendUpdateVolTargetInfo(virStorageVolType voltype, ...@@ -1900,7 +1900,7 @@ virStorageBackendUpdateVolTargetInfo(virStorageVolType voltype,
if ((ret = virStorageBackendUpdateVolTargetInfoFD(target, fd, &sb)) < 0) if ((ret = virStorageBackendUpdateVolTargetInfoFD(target, fd, &sb)) < 0)
goto cleanup; goto cleanup;
if (voltype == VIR_STORAGE_VOL_FILE && if ((voltype == VIR_STORAGE_VOL_FILE || voltype == VIR_STORAGE_VOL_BLOCK) &&
target->format != VIR_STORAGE_FILE_NONE) { target->format != VIR_STORAGE_FILE_NONE) {
if (S_ISDIR(sb.st_mode)) { if (S_ISDIR(sb.st_mode)) {
if (virStorageBackendIsPloopDir(target->path)) { if (virStorageBackendIsPloopDir(target->path)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册