On Wed, Mar 26, 2025 at 10:53:20 +0100, Markus wrote: > zoudongjie via <qemu-de...@nongnu.org> writes: > > > From: Zhu Yangyang <zhuyangyan...@huawei.com> > > > > Calling qmp_block_set_io_throttle() will be blocked for a long time > > when a network disk is configured and the network failure is just about > > to occur. > > > > Therefore, we add a timeout parameter for qmp_block_set_io_throttle to > > control > > its execution duration. > > What's the QMP reply when a block_set_io_throttle command times out?
The reply is: {"id":"libvirt-484","error":{"class":"GenericError","desc":"Blk io limits disable timeout"}} > > > > > The default value of timeout is 0, that is infinite wait, consistent with > > previous behavior. > > > > Signed-off-by: Zhu Yangyang <zhuyangyan...@huawei.com> > > [...] > > > diff --git a/qapi/block-core.json b/qapi/block-core.json > > index b1937780e1..88ef593efd 100644 > > --- a/qapi/block-core.json > > +++ b/qapi/block-core.json > > @@ -2626,6 +2626,9 @@ > > # > > # @group: throttle group name (Since 2.4) > > # > > +# @timeout: In seconds. Timeout for block_set_io_throttle, > > +# 0 means no limit. Defaults to 0. (Since 10.0) > > Make that 10.1, since it won't make 10.0. Ok, I'll correct it in the next version. > > > +# > > # Features: > > # > > # @deprecated: Member @device is deprecated. Use @id instead. > > @@ -2642,7 +2645,7 @@ > > '*bps_max_length': 'int', '*bps_rd_max_length': 'int', > > '*bps_wr_max_length': 'int', '*iops_max_length': 'int', > > '*iops_rd_max_length': 'int', '*iops_wr_max_length': 'int', > > - '*iops_size': 'int', '*group': 'str' } } > > + '*iops_size': 'int', '*group': 'str', '*timeout': 'uint32'} } > > > > ## > > # @ThrottleLimits: