mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-27 16:15:23 +00:00
rbd: Change virStorageBackendRBDCloseRADOSConn to be static void
Since none of the callers check the status, let's just alter it to a static void. While we're at it - scrap the local runtime variable and just do the math in the VIR_DEBUG directly. Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
dfcd164ba9
commit
23671359f5
@ -205,29 +205,23 @@ virStorageBackendRBDOpenIoCTX(virStorageBackendRBDStatePtr ptr,
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static void
|
||||||
virStorageBackendRBDCloseRADOSConn(virStorageBackendRBDStatePtr ptr)
|
virStorageBackendRBDCloseRADOSConn(virStorageBackendRBDStatePtr ptr)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
if (ptr->ioctx != NULL) {
|
if (ptr->ioctx != NULL) {
|
||||||
VIR_DEBUG("Closing RADOS IoCTX");
|
VIR_DEBUG("Closing RADOS IoCTX");
|
||||||
rados_ioctx_destroy(ptr->ioctx);
|
rados_ioctx_destroy(ptr->ioctx);
|
||||||
ret = -1;
|
|
||||||
}
|
}
|
||||||
ptr->ioctx = NULL;
|
ptr->ioctx = NULL;
|
||||||
|
|
||||||
if (ptr->cluster != NULL) {
|
if (ptr->cluster != NULL) {
|
||||||
VIR_DEBUG("Closing RADOS connection");
|
VIR_DEBUG("Closing RADOS connection");
|
||||||
rados_shutdown(ptr->cluster);
|
rados_shutdown(ptr->cluster);
|
||||||
ret = -2;
|
|
||||||
}
|
}
|
||||||
ptr->cluster = NULL;
|
ptr->cluster = NULL;
|
||||||
|
|
||||||
time_t runtime = time(0) - ptr->starttime;
|
VIR_DEBUG("RADOS connection existed for %ld seconds",
|
||||||
VIR_DEBUG("RADOS connection existed for %ld seconds", runtime);
|
time(0) - ptr->starttime);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user