virStorageBackendPtr backend;
virStorageVolDefPtr origvol = NULL, newvol = NULL;
virStorageVolPtr ret = NULL, volobj = NULL;
+ unsigned long long allocation;
int buildret;
virCheckFlags(VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA, NULL);
origvol->building = 0;
newvol->building = 0;
+ allocation = newvol->allocation;
newvol = NULL;
pool->asyncjobs--;
}
/* Updating pool metadata */
- pool->def->allocation += newvol->allocation;
- pool->def->available -= newvol->allocation;
+ pool->def->allocation += allocation;
+ pool->def->available -= allocation;
VIR_INFO("Creating volume '%s' in storage pool '%s'",
volobj->name, pool->def->name);