mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 06:25:19 +00:00
storage: rbd: Fix build
After the recent commits the build didn't work for me. Fix it by using size_t as the callback argument is using and the correct formatter. The attempted fixup to use %llu as a formatter was wrong.
This commit is contained in:
parent
33a1a7c6f5
commit
98033a8b94
@ -311,7 +311,7 @@ virStorageBackendRBDRefreshVolInfoCb(uint64_t offset ATTRIBUTE_UNUSED,
|
|||||||
int exists,
|
int exists,
|
||||||
void *arg)
|
void *arg)
|
||||||
{
|
{
|
||||||
uint64_t *used_size = (uint64_t *)(arg);
|
size_t *used_size = (size_t *)(arg);
|
||||||
if (exists)
|
if (exists)
|
||||||
(*used_size) += len;
|
(*used_size) += len;
|
||||||
|
|
||||||
@ -324,7 +324,7 @@ virStorageBackendRBDSetAllocation(virStorageVolDefPtr vol,
|
|||||||
rbd_image_info_t *info)
|
rbd_image_info_t *info)
|
||||||
{
|
{
|
||||||
int r, ret = -1;
|
int r, ret = -1;
|
||||||
uint64_t allocation = 0;
|
size_t allocation = 0;
|
||||||
|
|
||||||
if ((r = rbd_diff_iterate2(image, NULL, 0, info->size, 0, 1,
|
if ((r = rbd_diff_iterate2(image, NULL, 0, info->size, 0, 1,
|
||||||
&virStorageBackendRBDRefreshVolInfoCb,
|
&virStorageBackendRBDRefreshVolInfoCb,
|
||||||
@ -334,7 +334,7 @@ virStorageBackendRBDSetAllocation(virStorageVolDefPtr vol,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
VIR_DEBUG("Found %llu bytes allocated for RBD image %s",
|
VIR_DEBUG("Found %zu bytes allocated for RBD image %s",
|
||||||
allocation, vol->name);
|
allocation, vol->name);
|
||||||
|
|
||||||
vol->target.allocation = allocation;
|
vol->target.allocation = allocation;
|
||||||
|
Loading…
Reference in New Issue
Block a user