From 9508682ba090014f0fdf9399ca256b2fa5a606ec Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Tue, 6 Dec 2016 18:37:46 -0500 Subject: [PATCH] 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. --- src/storage/storage_backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c index 742dc07db6..20c2b85115 100644 --- a/src/storage/storage_backend.c +++ b/src/storage/storage_backend.c @@ -1900,7 +1900,7 @@ virStorageBackendUpdateVolTargetInfo(virStorageVolType voltype, if ((ret = virStorageBackendUpdateVolTargetInfoFD(target, fd, &sb)) < 0) 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) { if (S_ISDIR(sb.st_mode)) { if (virStorageBackendIsPloopDir(target->path)) { -- 2.47.2