summary refs log tree commit diff stats
path: root/include/chardev/char-socket.h
diff options
context:
space:
mode:
authorDaniil Tatianin <d-tatianin@yandex-team.ru>2024-09-13 12:46:04 +0300
committerMarc-André Lureau <marcandre.lureau@redhat.com>2024-10-09 12:07:54 +0400
commitc8e2b6b4d7e2abaf34afd120eb065227ce240106 (patch)
tree747f7dc0fb5fc0311501670383c32a3160af0117 /include/chardev/char-socket.h
parent2af37e791906cfda42cb9604a16d218e56994bb1 (diff)
downloadfocaccia-qemu-c8e2b6b4d7e2abaf34afd120eb065227ce240106.tar.gz
focaccia-qemu-c8e2b6b4d7e2abaf34afd120eb065227ce240106.zip
chardev: introduce 'reconnect-ms' and deprecate 'reconnect'
The 'reconnect' option only allows to specify the time in seconds,
which is way too long for certain workflows.

We have a lightweight disk backend server, which takes about 20ms to
live update, but due to this limitation in QEMU, previously the guest
disk controller would hang for one second because it would take this
long for QEMU to reinitialize the socket connection.

Introduce a new option called 'reconnect-ms', which is the same as
'reconnect', except the value is treated as milliseconds. These are
mutually exclusive and specifying both results in an error.

'reconnect' is also deprecated by this commit to make it possible to
remove it in the future as to not keep two options that control the
same thing.

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Acked-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Acked-by: Markus Armbruster <armbru@redhat.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240913094604.269135-1-d-tatianin@yandex-team.ru>
Diffstat (limited to 'include/chardev/char-socket.h')
-rw-r--r--include/chardev/char-socket.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/chardev/char-socket.h b/include/chardev/char-socket.h
index 0708ca6fa9..d6d13ad37f 100644
--- a/include/chardev/char-socket.h
+++ b/include/chardev/char-socket.h
@@ -74,7 +74,7 @@ struct SocketChardev {
     bool is_websock;
 
     GSource *reconnect_timer;
-    int64_t reconnect_time;
+    int64_t reconnect_time_ms;
     bool connect_err_reported;
 
     QIOTask *connect_task;