On 06/30/2015 04:19 PM, Chris J Arges wrote:
In commit fbcf7da95, a change was introduced that no longer allowed
defining
volumes via XML with a capacity of '0'. Because we check for info.size_arg to be
non-zero, this use-case fails. This patch allows info.size_arg to be zero if no
backing store is specified.
Signed-off-by: Chris J Arges <chris.j.arges(a)canonical.com>
---
src/storage/storage_backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Found an orphaned patch....
Since that's Jan's fix - he should have a say here, but it seems you're
correct. Also of note is commit id '155ca616e' which changed the check
to add that check for size_arg being non-zero.
The ordering of the date of when the change was created is odd. Commit
id 'fbcf7da95' was committed after '155ca616e', but authored months
before.
I've copied Jan to get his thoughts.
John
diff --git a/src/storage/storage_backend.c
b/src/storage/storage_backend.c
index ce59f63..c661662 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -1068,7 +1068,7 @@ virStorageBackendCreateQemuImgCmdFromVol(virConnectPtr conn,
if (info.inputPath)
virCommandAddArg(cmd, info.inputPath);
virCommandAddArg(cmd, info.path);
- if (!info.inputPath && info.size_arg)
+ if (!info.inputPath && (info.size_arg || !info.backingPath))
virCommandAddArgFormat(cmd, "%lluK", info.size_arg);
return cmd;