[PATCH 08/48] qemu_agent: Drop @singleSync from _qemuAgent

Ján Tomko jtomko at redhat.com
Tue Nov 8 09:27:41 UTC 2022


On a Tuesday in 2022, Michal Privoznik wrote:
>Historically, before sending any guest agent command we would
>send 'guest-sync' command to make guest agent reset its internal
>state and flush any partially read command (json). This was
>because there was no event emitted when the agent
>(dis-)connected.
>
>But now that we have the event we can execute the sync command
>just once - the first time after we've connected. Should agent
>disconnect in the middle of reading a command, and then connect
>back again we would get the event and disconnect and connect back
>again, resulting in the sync command being executed again.
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> src/qemu/qemu_agent.c        | 7 ++-----
> src/qemu/qemu_agent.h        | 3 +--
> src/qemu/qemu_process.c      | 3 +--
> tests/qemumonitortestutils.c | 3 +--
> 4 files changed, 5 insertions(+), 11 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano


More information about the libvir-list mailing list