_("missing capacity element"));
goto error;
}
- if (virStorageSize(unit, capacity, &ret->capacity) < 0)
+ if (virStorageSize(unit, capacity, &ret->target.capacity) < 0)
goto error;
VIR_FREE(unit);
allocation = virXPathString("string(./allocation)", ctxt);
if (allocation) {
unit = virXPathString("string(./allocation/@unit)", ctxt);
- if (virStorageSize(unit, allocation, &ret->allocation) < 0)
+ if (virStorageSize(unit, allocation, &ret->target.allocation) < 0)
goto error;
} else {
- ret->allocation = ret->capacity;
+ ret->target.allocation = ret->target.capacity;
}
ret->target.path = virXPathString("string(./target/path)", ctxt);
virBufferAddLit(&buf, "</source>\n");
virBufferAsprintf(&buf, "<capacity unit='bytes'>%llu</capacity>\n",
- def->capacity);
+ def->target.capacity);
virBufferAsprintf(&buf, "<allocation unit='bytes'>%llu</allocation>\n",
- def->allocation);
+ def->target.allocation);
if (virStorageVolTargetDefFormat(options, &buf,
&def->target, "target") < 0)
unsigned int building;
- unsigned long long allocation; /* bytes */
- unsigned long long capacity; /* bytes */
-
virStorageVolSource source;
virStorageSource target;
virStorageSource backingStore;
/*
* esx_storage_backend_iscsi.c: ESX storage backend for iSCSI handling
*
+ * Copyright (C) 2014 Red Hat, Inc.
* Copyright (C) 2012 Ata E Husain Bohra <ata.husain@hotmail.com>
*
* This library is free software; you can redistribute it and/or
def.target.path = hostScsiDisk->devicePath;
- def.capacity = hostScsiDisk->capacity->block->value *
+ def.target.capacity = hostScsiDisk->capacity->block->value *
hostScsiDisk->capacity->blockSize->value;
- def.allocation = def.capacity;
+ def.target.allocation = def.target.capacity;
/* iSCSI LUN(s) hosting a datastore will be auto-mounted by ESX host */
def.target.format = VIR_STORAGE_FILE_RAW;
* esx_storage_backend_vmfs.c: ESX storage driver backend for
* managing VMFS datastores
*
- * Copyright (C) 2010-2011, 2013 Red Hat, Inc.
+ * Copyright (C) 2010-2014 Red Hat, Inc.
* Copyright (C) 2010-2012 Matthias Bolte <matthias.bolte@googlemail.com>
* Copyright (C) 2012 Ata E Husain Bohra <ata.husain@hotmail.com>
*
}
/* From the vSphere API documentation about VirtualDiskType ... */
- if (def->allocation == def->capacity) {
+ if (def->target.allocation == def->target.capacity) {
/*
* "A preallocated disk has all space allocated at creation time
* and the space is zeroed on demand as the space is used."
*/
virtualDiskSpec->diskType = (char *)"preallocated";
- } else if (def->allocation == 0) {
+ } else if (def->target.allocation == 0) {
/*
* "Space required for thin-provisioned virtual disk is allocated
* and zeroed on demand as the space is used."
virtualDiskSpec->adapterType = (char *)"busLogic";
virtualDiskSpec->capacityKb->value =
- VIR_DIV_UP(def->capacity, 1024); /* Scale from byte to kilobyte */
+ VIR_DIV_UP(def->target.capacity, 1024); /* Scale from byte to kilobyte */
if (esxVI_CreateVirtualDisk_Task
(priv->primary, datastorePath,
if (vmDiskFileInfo) {
/* Scale from kilobyte to byte */
- def.capacity = vmDiskFileInfo->capacityKb->value * 1024;
- def.allocation = vmDiskFileInfo->fileSize->value;
+ def.target.capacity = vmDiskFileInfo->capacityKb->value * 1024;
+ def.target.allocation = vmDiskFileInfo->fileSize->value;
def.target.format = VIR_STORAGE_FILE_VMDK;
} else if (isoImageFileInfo) {
- def.capacity = fileInfo->fileSize->value;
- def.allocation = fileInfo->fileSize->value;
+ def.target.capacity = fileInfo->fileSize->value;
+ def.target.allocation = fileInfo->fileSize->value;
def.target.format = VIR_STORAGE_FILE_ISO;
} else if (floppyImageFileInfo) {
- def.capacity = fileInfo->fileSize->value;
- def.allocation = fileInfo->fileSize->value;
+ def.target.capacity = fileInfo->fileSize->value;
+ def.target.allocation = fileInfo->fileSize->value;
def.target.format = VIR_STORAGE_FILE_RAW;
} else {
virCommandPtr cmd = virCommandNewArgList(PRLCTL, "set", pdom->uuid,
"--device-add", "hdd", NULL);
- virCommandAddArgFormat(cmd, "--size=%lluM", voldef->capacity >> 20);
+ virCommandAddArgFormat(cmd, "--size=%lluM", voldef->target.capacity >> 20);
if (!(strbus = parallelsGetDiskBusName(disk->bus))) {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
* parallels_storage.c: core driver functions for managing
* Parallels Cloud Server hosts
*
- * Copyright (C) 2013 Red Hat, Inc.
+ * Copyright (C) 2013-2014 Red Hat, Inc.
* Copyright (C) 2012 Parallels, Inc.
*
* This library is free software; you can redistribute it and/or
ctxt->node = root;
if (virXPathULongLong("string(./Disk_Parameters/Disk_size)",
- ctxt, &def->capacity) < 0) {
+ ctxt, &def->target.capacity) < 0) {
virReportError(VIR_ERR_XML_ERROR,
"%s", _("failed to get disk size from "
"the disk descriptor xml"));
goto cleanup;
}
- def->capacity <<= 9;
- def->allocation = def->capacity;
+ def->target.capacity <<= 9;
+ def->target.allocation = def->target.capacity;
ret = 0;
cleanup:
xmlXPathFreeContext(ctxt);
if (is_new) {
/* Make sure enough space */
- if ((pool->def->allocation + privvol->allocation) >
+ if ((pool->def->allocation + privvol->target.allocation) >
pool->def->capacity) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Not enough free space in pool for volume '%s'"),
goto cleanup;
}
- pool->def->allocation += privvol->allocation;
+ pool->def->allocation += privvol->target.allocation;
pool->def->available = (pool->def->capacity -
pool->def->allocation);
}
}
/* Make sure enough space */
- if ((privpool->def->allocation + privvol->allocation) >
+ if ((privpool->def->allocation + privvol->target.allocation) >
privpool->def->capacity) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Not enough free space in pool for volume '%s'"),
if (VIR_STRDUP(privvol->key, privvol->target.path) < 0)
goto cleanup;
- privpool->def->allocation += privvol->allocation;
+ privpool->def->allocation += privvol->target.allocation;
privpool->def->available = (privpool->def->capacity -
privpool->def->allocation);
char *xml_path = NULL;
size_t i;
- privpool->def->allocation -= privvol->allocation;
+ privpool->def->allocation -= privvol->target.allocation;
privpool->def->available = (privpool->def->capacity -
privpool->def->allocation);
memset(info, 0, sizeof(*info));
info->type = parallelsStorageVolTypeForPool(privpool->def->type);
- info->capacity = privvol->capacity;
- info->allocation = privvol->allocation;
+ info->capacity = privvol->target.capacity;
+ info->allocation = privvol->target.allocation;
ret = 0;
cleanup:
goto err;
}
- if (!voldef->capacity) {
+ if (!voldef->target.capacity) {
VIR_ERROR(_("Capacity cannot be empty."));
goto err;
}
key = phypBuildVolume(pool->conn, voldef->name, spdef->name,
- voldef->capacity);
+ voldef->target.capacity);
if (key == NULL)
goto err;
goto cleanup;
}
- remain = vol->allocation;
+ remain = vol->target.allocation;
if (inputvol) {
int res = virStorageBackendCopyToFD(vol, inputvol,
/* Seek to the final size, so the capacity is available upfront
* for progress reporting */
- if (ftruncate(fd, vol->capacity) < 0) {
+ if (ftruncate(fd, vol->target.capacity) < 0) {
ret = -errno;
virReportSystemError(errno,
_("cannot extend file '%s'"),
* to writing zeroes block by block in case fallocate isn't
* available, and since we're going to copy data from another
* file it doesn't make sense to write the file twice. */
- if (vol->allocation) {
- if (fallocate(fd, 0, 0, vol->allocation) == 0) {
+ if (vol->target.allocation) {
+ if (fallocate(fd, 0, 0, vol->target.allocation) == 0) {
need_alloc = false;
} else if (errno != ENOSYS && errno != EOPNOTSUPP) {
ret = -errno;
virReportSystemError(errno,
_("cannot allocate %llu bytes in file '%s'"),
- vol->allocation, vol->target.path);
+ vol->target.allocation, vol->target.path);
goto cleanup;
}
}
#endif
- remain = vol->allocation;
+ remain = vol->target.allocation;
if (inputvol) {
/* allow zero blocks to be skipped if we've requested sparse
* allocation (allocation < capacity) or we have already
* been able to allocate the required space. */
bool want_sparse = !need_alloc ||
- (vol->allocation < inputvol->capacity);
+ (vol->target.allocation < inputvol->target.capacity);
ret = virStorageBackendCopyToFD(vol, inputvol, fd, &remain, want_sparse);
if (ret < 0) {
}
if (remain && need_alloc) {
- if (safezero(fd, vol->allocation - remain, remain) < 0) {
+ if (safezero(fd, vol->target.allocation - remain, remain) < 0) {
ret = -errno;
virReportSystemError(errno, _("cannot fill file '%s'"),
vol->target.path);
}
/* Size in KB */
- size_arg = VIR_DIV_UP(vol->capacity, 1024);
+ size_arg = VIR_DIV_UP(vol->target.capacity, 1024);
cmd = virCommandNew(create_tool);
/* Size in MB - yes different units to qemu-img :-( */
if (virAsprintf(&size, "%llu",
- VIR_DIV_UP(vol->capacity, (1024 * 1024))) < 0)
+ VIR_DIV_UP(vol->target.capacity, (1024 * 1024))) < 0)
return -1;
cmd = virCommandNewArgList("qcow-create", size, vol->target.path, NULL);
int ret;
if ((ret = virStorageBackendUpdateVolTargetInfo(&vol->target,
- &vol->allocation,
- withCapacity ? &vol->capacity : NULL,
+ &vol->target.allocation,
+ withCapacity ? &vol->target.capacity : NULL,
withBlockVolFormat,
openflags)) < 0)
return ret;
/* The above gets allocation wrong for
* extended partitions, so overwrite it */
- vol->allocation = vol->capacity =
+ vol->target.allocation = vol->target.capacity =
(vol->source.extents[0].end - vol->source.extents[0].start);
if (STRNEQ(groups[2], "metadata"))
- pool->def->allocation += vol->allocation;
+ pool->def->allocation += vol->target.allocation;
if (vol->source.extents[0].end > pool->def->capacity)
pool->def->capacity = vol->source.extents[0].end;
if (virStorageBackendDiskPartBoundaries(pool, &startOffset,
&endOffset,
- vol->capacity) != 0) {
+ vol->target.capacity) != 0) {
goto cleanup;
}
if ((ret = virStorageBackendProbeTarget(&vol->target,
&backingStore,
&backingStoreFormat,
- &vol->allocation,
- &vol->capacity,
+ &vol->target.allocation,
+ &vol->target.capacity,
&vol->target.encryption)) < 0) {
if (ret == -2) {
/* Silently ignore non-regular files,
if (vol->target.format == VIR_STORAGE_FILE_RAW) {
return virStorageFileResize(vol->target.path, capacity,
- vol->allocation, pre_allocate);
+ vol->target.allocation, pre_allocate);
} else {
if (pre_allocate) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
goto cleanup;
if (virStorageBackendUpdateVolTargetInfoFD(&vol->target, -1, st,
- &vol->allocation,
- &vol->capacity) < 0)
+ &vol->target.allocation,
+ &vol->target.capacity) < 0)
goto cleanup;
if (virStorageBackendGlusterSetMetadata(state, vol, name) < 0)
vol->backingStore.format = VIR_STORAGE_FILE_RAW;
}
if (meta->capacity)
- vol->capacity = meta->capacity;
+ vol->target.capacity = meta->capacity;
if (meta->encrypted) {
if (VIR_ALLOC(vol->target.encryption) < 0)
goto cleanup;
"%s", _("malformed volume extent size value"));
goto cleanup;
}
- if (virStrToLong_ull(groups[8], NULL, 10, &vol->allocation) < 0) {
+ if (virStrToLong_ull(groups[8], NULL, 10, &vol->target.allocation) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("malformed volume allocation value"));
goto cleanup;
"--name", vol->name,
NULL);
virCommandAddArg(cmd, "-L");
- if (vol->capacity != vol->allocation) {
+ if (vol->target.capacity != vol->target.allocation) {
virCommandAddArgFormat(cmd, "%lluK",
- VIR_DIV_UP(vol->allocation ? vol->allocation : 1, 1024));
+ VIR_DIV_UP(vol->target.allocation
+ ? vol->target.allocation : 1, 1024));
virCommandAddArg(cmd, "--virtualsize");
}
- virCommandAddArgFormat(cmd, "%lluK", VIR_DIV_UP(vol->capacity, 1024));
+ virCommandAddArgFormat(cmd, "%lluK", VIR_DIV_UP(vol->target.capacity,
+ 1024));
if (vol->backingStore.path)
virCommandAddArgList(cmd, "-s", vol->backingStore.path, NULL);
else
/*
* storage_backend_mpath.c: storage backend for multipath handling
*
- * Copyright (C) 2009-2011, 2013 Red Hat, Inc.
+ * Copyright (C) 2009-2014 Red Hat, Inc.
* Copyright (C) 2009-2008 Dave Allan
*
* This library is free software; you can redistribute it and/or
if (VIR_APPEND_ELEMENT_COPY(pool->volumes.objs, pool->volumes.count, vol) < 0)
goto cleanup;
- pool->def->capacity += vol->capacity;
- pool->def->allocation += vol->allocation;
+ pool->def->capacity += vol->target.capacity;
+ pool->def->allocation += vol->target.allocation;
ret = 0;
cleanup:
/*
* storage_backend_rbd.c: storage backend for RBD (RADOS Block Device) handling
*
- * Copyright (C) 2013 Red Hat, Inc.
+ * Copyright (C) 2013-2014 Red Hat, Inc.
* Copyright (C) 2012 Wido den Hollander
*
* This library is free software; you can redistribute it and/or
(unsigned long long)info.obj_size,
(unsigned long long)info.num_objs);
- vol->capacity = info.size;
- vol->allocation = info.obj_size * info.num_objs;
+ vol->target.capacity = info.size;
+ vol->target.allocation = info.obj_size * info.num_objs;
vol->type = VIR_STORAGE_VOL_NETWORK;
VIR_FREE(vol->target.path);
VIR_DEBUG("Creating RBD image %s/%s with size %llu",
pool->def->source.name,
- vol->name, vol->capacity);
+ vol->name, vol->target.capacity);
virCheckFlags(0, -1);
goto cleanup;
}
- r = virStorageBackendRBDCreateImage(ptr.ioctx, vol->name, vol->capacity);
+ r = virStorageBackendRBDCreateImage(ptr.ioctx, vol->name,
+ vol->target.capacity);
if (r < 0) {
virReportSystemError(-r, _("failed to create volume '%s/%s'"),
pool->def->source.name,
goto free_vol;
}
- pool->def->capacity += vol->capacity;
- pool->def->allocation += vol->allocation;
+ pool->def->capacity += vol->target.capacity;
+ pool->def->allocation += vol->target.allocation;
if (VIR_APPEND_ELEMENT(pool->volumes.objs, pool->volumes.count, vol) < 0) {
retval = -1;
/*
* storage_backend_sheepdog.c: storage backend for Sheepdog handling
*
- * Copyright (C) 2013 Red Hat, Inc.
+ * Copyright (C) 2013-2014 Red Hat, Inc.
* Copyright (C) 2012 Wido den Hollander
* Copyright (C) 2012 Frank Spijkerman
* Copyright (C) 2012 Sebastian Wiedenroth
virCheckFlags(0, -1);
virCommandPtr cmd = virCommandNewArgList(COLLIE, "vdi", "create", vol->name, NULL);
- virCommandAddArgFormat(cmd, "%llu", vol->capacity);
+ virCommandAddArgFormat(cmd, "%llu", vol->target.capacity);
virStorageBackendSheepdogAddHostArg(cmd, pool);
if (virCommandRun(cmd, NULL) < 0)
goto cleanup;
int id;
const char *p, *next;
- vol->allocation = vol->capacity = 0;
+ vol->target.allocation = vol->target.capacity = 0;
p = output;
do {
p = end + 1;
- if (virStrToLong_ull(p, &end, 10, &vol->capacity) < 0)
+ if (virStrToLong_ull(p, &end, 10, &vol->target.capacity) < 0)
return -1;
p = end + 1;
- if (virStrToLong_ull(p, &end, 10, &vol->allocation) < 0)
+ if (virStrToLong_ull(p, &end, 10, &vol->target.allocation) < 0)
return -1;
return 0;
goto cleanup;
/* Update pool metadata */
- pool->def->allocation -= vol->allocation;
- pool->def->available += vol->allocation;
+ pool->def->allocation -= vol->target.allocation;
+ pool->def->available += vol->target.allocation;
for (i = 0; i < pool->volumes.count; i++) {
if (pool->volumes.objs[i] == vol) {
}
/* Update pool metadata */
- pool->def->allocation += buildvoldef->allocation;
- pool->def->available -= buildvoldef->allocation;
+ pool->def->allocation += buildvoldef->target.allocation;
+ pool->def->available -= buildvoldef->target.allocation;
VIR_INFO("Creating volume '%s' in storage pool '%s'",
volobj->name, pool->def->name);
}
/* Is there ever a valid case for this? */
- if (newvol->capacity < origvol->capacity)
- newvol->capacity = origvol->capacity;
+ if (newvol->target.capacity < origvol->target.capacity)
+ newvol->target.capacity = origvol->target.capacity;
/* Make sure allocation is at least as large as the destination cap,
* to make absolutely sure we copy all possible contents */
- if (newvol->allocation < origvol->capacity)
- newvol->allocation = origvol->capacity;
+ if (newvol->target.allocation < origvol->target.capacity)
+ newvol->target.allocation = origvol->target.capacity;
if (!backend->buildVolFrom) {
virReportError(VIR_ERR_NO_SUPPORT,
origvol->building = 0;
newvol->building = 0;
- allocation = newvol->allocation;
+ allocation = newvol->target.allocation;
newvol = NULL;
pool->asyncjobs--;
}
if (flags & VIR_STORAGE_VOL_RESIZE_DELTA) {
- abs_capacity = vol->capacity + capacity;
+ abs_capacity = vol->target.capacity + capacity;
flags &= ~VIR_STORAGE_VOL_RESIZE_DELTA;
} else {
abs_capacity = capacity;
}
- if (abs_capacity < vol->allocation) {
+ if (abs_capacity < vol->target.allocation) {
virReportError(VIR_ERR_INVALID_ARG, "%s",
_("can't shrink capacity below "
"existing allocation"));
goto cleanup;
}
- if (abs_capacity < vol->capacity &&
+ if (abs_capacity < vol->target.capacity &&
!(flags & VIR_STORAGE_VOL_RESIZE_SHRINK)) {
virReportError(VIR_ERR_INVALID_ARG, "%s",
_("Can't shrink capacity below current "
goto cleanup;
}
- if (abs_capacity > vol->capacity + pool->def->available) {
+ if (abs_capacity > vol->target.capacity + pool->def->available) {
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("Not enough space left on storage pool"));
goto cleanup;
if (backend->resizeVol(obj->conn, pool, vol, abs_capacity, flags) < 0)
goto cleanup;
- vol->capacity = abs_capacity;
+ vol->target.capacity = abs_capacity;
if (flags & VIR_STORAGE_VOL_RESIZE_ALLOCATE)
- vol->allocation = abs_capacity;
+ vol->target.allocation = abs_capacity;
/* Update pool metadata */
- pool->def->allocation += (abs_capacity - vol->capacity);
- pool->def->available -= (abs_capacity - vol->capacity);
+ pool->def->allocation += (abs_capacity - vol->target.capacity);
+ pool->def->available -= (abs_capacity - vol->target.capacity);
ret = 0;
ret = storageWipeExtent(def,
fd,
0,
- def->allocation,
+ def->target.allocation,
writebuf,
st.st_blksize,
&bytes_wiped);
memset(info, 0, sizeof(*info));
info->type = vol->type;
- info->capacity = vol->capacity;
- info->allocation = vol->allocation;
+ info->capacity = vol->target.capacity;
+ info->allocation = vol->target.allocation;
ret = 0;
cleanup:
if (VIR_APPEND_ELEMENT_COPY(pool->volumes.objs, pool->volumes.count, def) < 0)
goto error;
- pool->def->allocation += def->allocation;
+ pool->def->allocation += def->target.allocation;
pool->def->available = (pool->def->capacity -
pool->def->allocation);
def = NULL;
}
/* Make sure enough space */
- if ((privpool->def->allocation + privvol->allocation) >
+ if ((privpool->def->allocation + privvol->target.allocation) >
privpool->def->capacity) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Not enough free space in pool for volume '%s'"),
privpool->volumes.count, privvol) < 0)
goto cleanup;
- privpool->def->allocation += privvol->allocation;
+ privpool->def->allocation += privvol->target.allocation;
privpool->def->available = (privpool->def->capacity -
privpool->def->allocation);
}
/* Make sure enough space */
- if ((privpool->def->allocation + privvol->allocation) >
+ if ((privpool->def->allocation + privvol->target.allocation) >
privpool->def->capacity) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Not enough free space in pool for volume '%s'"),
privpool->volumes.count, privvol) < 0)
goto cleanup;
- privpool->def->allocation += privvol->allocation;
+ privpool->def->allocation += privvol->target.allocation;
privpool->def->available = (privpool->def->capacity -
privpool->def->allocation);
}
- privpool->def->allocation -= privvol->allocation;
+ privpool->def->allocation -= privvol->target.allocation;
privpool->def->available = (privpool->def->capacity -
privpool->def->allocation);
memset(info, 0, sizeof(*info));
info->type = testStorageVolumeTypeForPool(privpool->def->type);
- info->capacity = privvol->capacity;
- info->allocation = privvol->allocation;
+ info->capacity = privvol->target.capacity;
+ info->allocation = privvol->target.allocation;
ret = 0;
cleanup:
virStoragePermsPtr perms;
virStorageTimestampsPtr timestamps;
+ unsigned long long allocation; /* in bytes, 0 if unknown */
+ unsigned long long capacity; /* in bytes, 0 if unknown */
size_t nseclabels;
virSecurityDeviceLabelDefPtr *seclabels;
};
rc = data->vboxObj->vtbl->CreateHardDisk(data->vboxObj, hddFormatUtf16, hddNameUtf16, &hardDisk);
if (NS_SUCCEEDED(rc)) {
IProgress *progress = NULL;
- PRUint64 logicalSize = VIR_DIV_UP(def->capacity, 1024 * 1024);
+ PRUint64 logicalSize = VIR_DIV_UP(def->target.capacity,
+ 1024 * 1024);
PRUint32 variant = HardDiskVariant_Standard;
- if (def->capacity == def->allocation)
+ if (def->target.capacity == def->target.allocation)
variant = HardDiskVariant_Fixed;
#if VBOX_API_VERSION < 4003000
rc = hardDisk->vtbl->GetLogicalSize(hardDisk, &hddLogicalSize);
if (NS_SUCCEEDED(rc) && defOk) {
#if VBOX_API_VERSION < 4000000
- def.capacity = hddLogicalSize * 1024 * 1024; /* MB => Bytes */
+ def.target.capacity = hddLogicalSize * 1024 * 1024; /* MB => Bytes */
#else /* VBOX_API_VERSION >= 4000000 */
- def.capacity = hddLogicalSize;
+ def.target.capacity = hddLogicalSize;
#endif /* VBOX_API_VERSION >= 4000000 */
} else
defOk = 0;
rc = VBOX_MEDIUM_FUNC_ARG1(hardDisk, GetSize, &hddActualSize);
if (NS_SUCCEEDED(rc) && defOk)
- def.allocation = hddActualSize;
+ def.target.allocation = hddActualSize;
else
defOk = 0;
/*
* storagebackendsheepdogtest.c: storage backend for Sheepdog handling
*
+ * Copyright (C) 2014 Red Hat, Inc.
* Copyright (C) 2012 Sebastian Wiedenroth
*
* This library is free software; you can redistribute it and/or
goto cleanup;
}
- if (vol->capacity == test.expected_capacity &&
- vol->allocation == test.expected_allocation)
+ if (vol->target.capacity == test.expected_capacity &&
+ vol->target.allocation == test.expected_allocation)
ret = 0;
cleanup: