All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] qapi/throttle: Fix qmp_block_set_io_throttle blocked for too long
@ 2025-03-21  7:09 zoudongjie via
  2025-03-21  7:09 ` [PATCH v2 1/2] io/block: Refactoring the bdrv_drained_begin() function and implement a timeout mechanism zoudongjie via
  2025-03-21  7:09 ` [PATCH v2 2/2] qapi/throttle: add timeout parameter for qmp_block_set_io_throttle() zoudongjie via
  0 siblings, 2 replies; 6+ messages in thread
From: zoudongjie via @ 2025-03-21  7:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: stefanha, kwolf, fam, hreitz, alex.chen, chenjianfei3,
	eric.fangyi, luolongmin, mujinsheng, qemu-block, qemu-stable,
	renxuming, suxiaodong1, wangjian161, wangyan122, yebiaoxiang,
	zhuyangyang14, zoudongjie

From: Zhu Yangyang <zhuyangyang14@huawei.com>

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 for expiry instead of explicitly checking
     against the deadline for BDRV_POLL_WHILE_TIMEOUT().
  4. Add documentation for bdrv_drained_begin_timeout(), note that bdrv_drained_end()
     must be called when -ETIMEDOUT is returned.
  5. Add a timeout parameter to the qmp_block_set_io_throttle() instead of hardcoding
     the timeout, and the default value is 0, mean an infinite timeout.

v1 patch link:
https://lore.kernel.org/qemu-devel/20250308101618.721954-1-zoudongjie@huawei.com/

Zhu Yangyang (2):
  io/block: Refactoring the bdrv_drained_begin() function and implement
    a timeout mechanism.
  qapi/throttle: add timeout parameter for qmp_block_set_io_throttle()

 block/block-backend.c                       | 14 ++++-
 block/io.c                                  | 58 +++++++++++++++++----
 block/qapi-system.c                         | 10 +++-
 include/block/aio-wait.h                    | 49 +++++++++++++++++
 include/block/block-io.h                    | 22 +++++++-
 include/system/block-backend-global-state.h |  1 +
 qapi/block-core.json                        |  5 +-
 util/aio-wait.c                             |  5 ++
 8 files changed, 150 insertions(+), 14 deletions(-)

-- 
2.33.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-03-26  7:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-21  7:09 [PATCH v2 0/2] qapi/throttle: Fix qmp_block_set_io_throttle blocked for too long zoudongjie via
2025-03-21  7:09 ` [PATCH v2 1/2] io/block: Refactoring the bdrv_drained_begin() function and implement a timeout mechanism zoudongjie via
2025-03-24 18:09   ` Stefan Hajnoczi
2025-03-26  7:30     ` zoudongjie via
2025-03-21  7:09 ` [PATCH v2 2/2] qapi/throttle: add timeout parameter for qmp_block_set_io_throttle() zoudongjie via
2025-03-24 18:12   ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.