[PATCH] qemu_agent: Bring back single sync

Ján Tomko jtomko at redhat.com
Tue Nov 8 08:16:54 UTC 2022


On a Monday in 2022, Michal Privoznik wrote:
>Historically, we had no idea whether the qemu-ga running inside
>the guest was running or not. Or whether it crashed in the middle
>of reading of a command. That's why we issued guest-sync prior
>any intended command, to make the agent flush any partially read
>JSON and reset its state machine.
>
>But with VSERPORT_CHANGE event we know when the guest agent
>(dis-)connects and thus can issue the sync command just once for
>each 'connection'. Whether the agent is synced is tracked in
>agent->inSync member, which used to be set to true upon
>successful sync. But after rework in v8.0.0-rc1~361 that line is
>gone, leaving us with using the historic approach basically.
>
>Fixes: cad84fd51eaac5e3bfdf441f9986e1f2639a0828
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> src/qemu/qemu_agent.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>

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

Jano


More information about the libvir-list mailing list