diff options
author | Kristina Hanicova <khanicov@redhat.com> | 2022-09-05 15:57:13 +0200 |
---|---|---|
committer | Ján Tomko <jtomko@redhat.com> | 2022-09-07 12:14:43 +0200 |
commit | 421f1e749f00f16284ac262a82ede403557c5a5f (patch) | |
tree | 5137428859ebb83b6500ddd903991a0306801850 /docs/kbase | |
parent | ac57f744fc087d20822002c53ffd01dd194922eb (diff) | |
download | libvirt-421f1e749f00f16284ac262a82ede403557c5a5f.tar.gz |
qemu & conf: move BeginAgentJob & EndAgentJob into src/conf/virdomainjob
Although these and functions in the following two patches are for
now just being used by the qemu driver, it makes sense to have all
begin job functions in the same file.
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Diffstat (limited to 'docs/kbase')
-rw-r--r-- | docs/kbase/internals/qemu-threads.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/kbase/internals/qemu-threads.rst b/docs/kbase/internals/qemu-threads.rst index 22d12f61a5..afdf9e61cc 100644 --- a/docs/kbase/internals/qemu-threads.rst +++ b/docs/kbase/internals/qemu-threads.rst @@ -62,7 +62,7 @@ There are a number of locks on various objects Agent job condition is then used when thread wishes to talk to qemu agent monitor. It is possible to acquire just agent job - (``qemuDomainObjBeginAgentJob``), or only normal job (``virDomainObjBeginJob``) + (``virDomainObjBeginAgentJob``), or only normal job (``virDomainObjBeginJob``) but not both at the same time. Holding an agent job and a normal job would allow an unresponsive or malicious agent to block normal libvirt API and potentially result in a denial of service. Which type of job to grab @@ -130,11 +130,11 @@ To acquire the normal job condition To acquire the agent job condition - ``qemuDomainObjBeginAgentJob()`` + ``virDomainObjBeginAgentJob()`` - Waits until there is no other agent job set - Sets ``job.agentActive`` to the job type - ``qemuDomainObjEndAgentJob()`` + ``virDomainObjEndAgentJob()`` - Sets ``job.agentActive`` to 0 - Signals on ``job.cond`` condition @@ -253,7 +253,7 @@ Design patterns obj = qemuDomObjFromDomain(dom); - qemuDomainObjBeginAgentJob(obj, VIR_AGENT_JOB_TYPE); + virDomainObjBeginAgentJob(obj, VIR_AGENT_JOB_TYPE); ...do prep work... @@ -266,7 +266,7 @@ Design patterns ...do final work... - qemuDomainObjEndAgentJob(obj); + virDomainObjEndAgentJob(obj); virDomainObjEndAPI(&obj); |