[PATCH v4 2/3] qapi/throttle: add timeout parameter for qmp_block_set_io_throttle()

2025-04-05 Thread zoudongjie via
From: Zhu Yangyang 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. The default value of ti

[PATCH v2 1/2] io/block: Refactoring the bdrv_drained_begin() function and implement a timeout mechanism.

2025-04-05 Thread zoudongjie via
From: Zhu Yangyang The bdrv_drained_begin() function is a blocking function. In scenarios where network storage is used and network links fail, it may block for a long time. Therefore, we add a timeout parameter to control the duration of the block. Since bdrv_drained_begin() has been widely ad

Re: [PATCH v3 2/2] qapi/throttle: add timeout parameter for qmp_block_set_io_throttle()

2025-04-04 Thread zoudongjie via
On Thu, 27 Mar 2025 09:04:51 +0100, Markus wrote: > zoudongjie writes: > > > On Wed, Mar 26, 2025 at 10:53:20 +0100, Markus wrote: > >> zoudongjie via writes: > >> > >> > From: Zhu Yangyang > >> > > >> > Calling qmp_block_set_i

[PATCH v4 3/3] qapi/resize: add timeout parameter for qmp_block_resize()

2025-04-04 Thread zoudongjie via
From: Zhu Yangyang Calling qmp_block_resize() will be blocked for a long time on bdrv_drained_begin() when a network disk is configured and the network failure is just about to occur. Therefore, we add a timeout parameter for qmp_block_resize() to control its execution duration. The default va

[PATCH v2 0/2] qapi/throttle: Fix qmp_block_set_io_throttle blocked for too long

2025-04-04 Thread zoudongjie via
From: Zhu Yangyang First of all, thanks to Stefan Hajnoczi for his suggestions, I made the following changes in this patch: 1. Support 0 in BDRV_POLL_WHILE_TIMEOUT(), 0 means infinite. 2. Use uint64_t timeout_ns instead of int64 timeout to name variables. 3. Use timer_pending() to check fo

[PATCH v4 1/3] io/block: Refactoring the bdrv_drained_begin() function and implement a timeout mechanism.

2025-04-01 Thread zoudongjie via
From: Zhu Yangyang The bdrv_drained_begin() function is a blocking function. In scenarios where network storage is used and network links fail, it may block for a long time. Therefore, we add a timeout parameter to control the duration of the block. Since bdrv_drained_begin() has been widely ad

[PATCH v4 0/3] qapi: Fix some command blocked for too long

2025-04-01 Thread zoudongjie via
From: Zhu Yangyang QMP may will be blocked for a long time on bdrv_drained_begin() when a network disk is configured and the network failure is just about to occur. In theory, any command may be blocked if it calls bdrv_drained_begin(). This series add a timeout parameter for qmp_block_set_io_t

Re: [PATCH v3 2/2] qapi/throttle: add timeout parameter for qmp_block_set_io_throttle()

2025-04-01 Thread zoudongjie via
I'm sorry for the delay in replying. On Thu, 27 Mar 2025 14:43:54 +0100, Markus wrote: > zoudongjie writes: > > On Thu, 27 Mar 2025 09:04:51 +0100, Markus wrote: > >> zoudongjie writes: > >> > >> > On Wed, Mar 26, 2025 at 10:53:20 +0100,

Re: [PATCH v3 2/2] qapi/throttle: add timeout parameter for qmp_block_set_io_throttle()

2025-03-27 Thread zoudongjie via
On Thu, 27 Mar 2025 09:04:51 +0100, Markus wrote: > zoudongjie writes: > > > On Wed, Mar 26, 2025 at 10:53:20 +0100, Markus wrote: > >> zoudongjie via writes: > >> > >> > From: Zhu Yangyang > >> > > >> > Calling qmp_block_set_i

Re: [PATCH v3 2/2] qapi/throttle: add timeout parameter for qmp_block_set_io_throttle()

2025-03-27 Thread zoudongjie via
On Wed, Mar 26, 2025 at 10:53:20 +0100, Markus wrote: > zoudongjie via writes: > > > From: Zhu Yangyang > > > > 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 > >

[PATCH v3 1/2] io/block: Refactoring the bdrv_drained_begin() function and implement a timeout mechanism.

2025-03-26 Thread zoudongjie via
From: Zhu Yangyang The bdrv_drained_begin() function is a blocking function. In scenarios where network storage is used and network links fail, it may block for a long time. Therefore, we add a timeout parameter to control the duration of the block. Since bdrv_drained_begin() has been widely ad

[PATCH v3 2/2] qapi/throttle: add timeout parameter for qmp_block_set_io_throttle()

2025-03-26 Thread zoudongjie via
From: Zhu Yangyang 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. The default value of ti

[PATCH v3 0/2] qapi/throttle: Fix qmp_block_set_io_throttle blocked for too long

2025-03-26 Thread zoudongjie via
From: Zhu Yangyang 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. This series add a timeout parameter for qmp_block_set_io_throttle to control its execution duration. Changelog v3 --- Unify

Re: [PATCH v2 1/2] io/block: Refactoring the bdrv_drained_begin() function and implement a timeout mechanism.

2025-03-26 Thread zoudongjie via
From: Zhu Yangyang On Mon, 24 Mar 2025 14:09:13 -0400, Stefan Hajnoczi wrote: > On Fri, Mar 21, 2025 at 03:09:16PM +0800, zoudongjie wrote: > > From: Zhu Yangyang > > > > The bdrv_drained_begin() function is a blocking function. In scenarios > > where network storage > > is used and network lin

[PATCH v2 2/2] qapi/throttle: add timeout parameter for qmp_block_set_io_throttle()

2025-03-21 Thread zoudongjie via
From: Zhu Yangyang 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. The default value of ti

Re: [PATCH 2/2] qapi: Fix qmp_block_set_io_throttle blocked for too long

2025-03-17 Thread zoudongjie via
On Thu, 13 Mar, 2025 at 12:25:08 +0800, Stefan Hajnoczi wrote: > On Sat, Mar 08, 2025 at 06:16:18PM +0800, zoudongjie wrote: > > From: Zhu Yangyang > > > > bdrv_drained_begin() is blocked for a long time when network storage is used > > and the network link has just failed. > > Therefore, the tim

Re: [PATCH 1/2] io/block: Refactoring the bdrv_drained_begin() function and implement a timeout mechanism.

2025-03-17 Thread zoudongjie via
On Thu, 13 Mar, 2025 at 12:09:45 +0800, Stefan Hajnoczi wrote: > On Sat, Mar 08, 2025 at 06:16:17PM +0800, zoudongjie wrote: > > From: Zhu Yangyang > > > > The bdrv_drained_begin() function is a blocking function. In scenarios > > where network storage > > is used and network links fail, it may

Re: [PATCH 0/2] qapi: Fix qmp_block_set_io_throttle blocked for too long

2025-03-15 Thread zoudongjie via
Ping.

[PATCH 1/2] io/block: Refactoring the bdrv_drained_begin() function and implement a timeout mechanism.

2025-03-08 Thread zoudongjie via
From: Zhu Yangyang The bdrv_drained_begin() function is a blocking function. In scenarios where network storage is used and network links fail, it may block for a long time. Therefore, we add a timeout parameter to control the duration of the block. Since bdrv_drained_begin() has been widely ad

[PATCH 0/2] qapi: Fix qmp_block_set_io_throttle blocked for too long

2025-03-08 Thread zoudongjie via
From: Zhu Yangyang In the disable branch of qmp_block_set_io_throttle(), we call bdrv_drained_begin(). We know that bdrv_drained_begin() is a blocking interface used to wait for all submitted I/O operations to complete, i.e., to wait until bs->in_flight becomes zero. Theoretically, once we sto

[PATCH 2/2] qapi: Fix qmp_block_set_io_throttle blocked for too long

2025-03-08 Thread zoudongjie via
From: Zhu Yangyang bdrv_drained_begin() is blocked for a long time when network storage is used and the network link has just failed. Therefore, the timeout period is set here. Signed-off-by: Zhu Yangyang --- block/block-backend.c | 14 +- block/qapi-system.c