mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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>
This commit is contained in:
committed by
Marc-André Lureau
parent
2af37e7919
commit
c8e2b6b4d7
+15
-2
@@ -273,7 +273,19 @@
|
||||
#
|
||||
# @reconnect: For a client socket, if a socket is disconnected, then
|
||||
# attempt a reconnect after the given number of seconds. Setting
|
||||
# this to zero disables this function. (default: 0) (Since: 2.2)
|
||||
# this to zero disables this function. The use of this member is
|
||||
# deprecated, use @reconnect-ms instead. (default: 0) (Since: 2.2)
|
||||
#
|
||||
# @reconnect-ms: For a client socket, if a socket is disconnected,
|
||||
# then attempt a reconnect after the given number of milliseconds.
|
||||
# Setting this to zero disables this function. This member is
|
||||
# mutually exclusive with @reconnect.
|
||||
# (default: 0) (Since: 9.2)
|
||||
#
|
||||
# Features:
|
||||
#
|
||||
# @deprecated: Member @reconnect is deprecated. Use @reconnect-ms
|
||||
# instead.
|
||||
#
|
||||
# Since: 1.4
|
||||
##
|
||||
@@ -287,7 +299,8 @@
|
||||
'*telnet': 'bool',
|
||||
'*tn3270': 'bool',
|
||||
'*websocket': 'bool',
|
||||
'*reconnect': 'int' },
|
||||
'*reconnect': { 'type': 'int', 'features': [ 'deprecated' ] },
|
||||
'*reconnect-ms': 'int' },
|
||||
'base': 'ChardevCommon' }
|
||||
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user