mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
rpc: add shutdown facilities to netserver
virNetServerClose and virNetServerShutdownWait are used to start net server threads shutdown and wait net server threads to actually finish respectively during net daemon shutdown procedure. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
0f38dedd89
commit
b776dfa8e8
@ -942,9 +942,17 @@ void virNetServerClose(virNetServerPtr srv)
|
|||||||
for (i = 0; i < srv->nclients; i++)
|
for (i = 0; i < srv->nclients; i++)
|
||||||
virNetServerClientClose(srv->clients[i]);
|
virNetServerClientClose(srv->clients[i]);
|
||||||
|
|
||||||
|
virThreadPoolStop(srv->workers);
|
||||||
|
|
||||||
virObjectUnlock(srv);
|
virObjectUnlock(srv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
virNetServerShutdownWait(virNetServerPtr srv)
|
||||||
|
{
|
||||||
|
virThreadPoolDrain(srv->workers);
|
||||||
|
}
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
virNetServerTrackPendingAuthLocked(virNetServerPtr srv)
|
virNetServerTrackPendingAuthLocked(virNetServerPtr srv)
|
||||||
{
|
{
|
||||||
|
@ -56,6 +56,7 @@ virNetServerPtr virNetServerNewPostExecRestart(virJSONValuePtr object,
|
|||||||
ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5) ATTRIBUTE_NONNULL(6);
|
ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5) ATTRIBUTE_NONNULL(6);
|
||||||
|
|
||||||
void virNetServerClose(virNetServerPtr srv);
|
void virNetServerClose(virNetServerPtr srv);
|
||||||
|
void virNetServerShutdownWait(virNetServerPtr srv);
|
||||||
|
|
||||||
virJSONValuePtr virNetServerPreExecRestart(virNetServerPtr srv);
|
virJSONValuePtr virNetServerPreExecRestart(virNetServerPtr srv);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user