提交 2aed051d 编写于 作者: W Wido den Hollander 提交者: John Ferlan

rbd: Use %zu for uint64_t instead of casting to unsigned long long

This was only used in debugging messages and not in any real code.

Ceph/RBD uses uint64_t for sizes internally and they can be printed
with %zu without any need for casting.
Signed-off-by: NWido den Hollander <wido@widodh.nl>
上级 f4981ebf
......@@ -303,10 +303,9 @@ volStorageBackendRBDRefreshVolInfo(virStorageVolDefPtr vol,
goto cleanup;
}
VIR_DEBUG("Refreshed RBD image %s/%s (size: %llu obj_size: %llu num_objs: %llu)",
pool->def->source.name, vol->name, (unsigned long long)info.size,
(unsigned long long)info.obj_size,
(unsigned long long)info.num_objs);
VIR_DEBUG("Refreshed RBD image %s/%s (size: %zu obj_size: %zu num_objs: %zu)",
pool->def->source.name, vol->name, info.size, info.obj_size,
info.num_objs);
vol->target.capacity = info.size;
vol->target.allocation = info.obj_size * info.num_objs;
......@@ -369,10 +368,9 @@ virStorageBackendRBDRefreshPool(virConnectPtr conn,
pool->def->available = clusterstat.kb_avail * 1024;
pool->def->allocation = poolstat.num_bytes;
VIR_DEBUG("Utilization of RBD pool %s: (kb: %llu kb_avail: %llu num_bytes: %llu)",
pool->def->source.name, (unsigned long long)clusterstat.kb,
(unsigned long long)clusterstat.kb_avail,
(unsigned long long)poolstat.num_bytes);
VIR_DEBUG("Utilization of RBD pool %s: (kb: %zu kb_avail: %zu num_bytes: %zu)",
pool->def->source.name, clusterstat.kb, clusterstat.kb_avail,
poolstat.num_bytes);
while (true) {
if (VIR_ALLOC_N(names, max_size) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册