[Qemu-devel] [PATCH v2 0/3] add bdrv_co_drain_begin/end BlockDriver callbacks

Manos Pitsidianakis posted 3 patches 8 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170921131707.17364-1-el13635@mail.ntua.gr
Test checkpatch passed
Test docker passed
Test s390x passed
There is a newer version of this series
include/block/block_int.h |  8 +++++++-
block/io.c                | 48 +++++++++++++++++++++++++++++++++--------------
block/qed.c               |  6 +++---
block/throttle.c          | 18 ++++++++++++++++++
4 files changed, 62 insertions(+), 18 deletions(-)
[Qemu-devel] [PATCH v2 0/3] add bdrv_co_drain_begin/end BlockDriver callbacks
Posted by Manos Pitsidianakis 8 years, 1 month ago
This patch series renames bdrv_co_drain to bdrv_co_drain_begin and adds a new 
bdrv_co_drain_end callback to match bdrv_drained_begin/end and 
drained_begin/end of BdrvChild. This is needed because the throttle driver 
(block/throttle.c) needs a way to mark the end of the drain in order to toggle 
io_limits_disabled correctly.

Based-on: <20170918202529.28379-1-el13635@mail.ntua.gr>
    "block/throttle-groups.c: allocate RestartData on the heap"
    Which fixes a coroutine crash in block/throttle-groups.c

v2: 
  add doc for callbacks and change order of request polling for completion 
  [Stefan]

Manos Pitsidianakis (3):
  block: add bdrv_co_drain_end callback
  block: rename bdrv_co_drain to bdrv_co_drain_begin
  block/throttle.c: add bdrv_co_drain_begin/end callbacks

 include/block/block_int.h |  8 +++++++-
 block/io.c                | 48 +++++++++++++++++++++++++++++++++--------------
 block/qed.c               |  6 +++---
 block/throttle.c          | 18 ++++++++++++++++++
 4 files changed, 62 insertions(+), 18 deletions(-)

-- 
2.11.0


Re: [Qemu-devel] [PATCH v2 0/3] add bdrv_co_drain_begin/end BlockDriver callbacks
Posted by Fam Zheng 8 years, 1 month ago
On Thu, 09/21 16:17, Manos Pitsidianakis wrote:
> This patch series renames bdrv_co_drain to bdrv_co_drain_begin and adds a new 
> bdrv_co_drain_end callback to match bdrv_drained_begin/end and 
> drained_begin/end of BdrvChild. This is needed because the throttle driver 
> (block/throttle.c) needs a way to mark the end of the drain in order to toggle 
> io_limits_disabled correctly.

Is this a bug fix? I.e. do we need to Cc qemu-stable@?

Fam

Re: [Qemu-devel] [PATCH v2 0/3] add bdrv_co_drain_begin/end BlockDriver callbacks
Posted by Manos Pitsidianakis 8 years, 1 month ago
On Thu, Sep 21, 2017 at 09:35:35PM +0800, Fam Zheng wrote:
>On Thu, 09/21 16:17, Manos Pitsidianakis wrote:
>> This patch series renames bdrv_co_drain to bdrv_co_drain_begin and adds a new
>> bdrv_co_drain_end callback to match bdrv_drained_begin/end and
>> drained_begin/end of BdrvChild. This is needed because the throttle driver
>> (block/throttle.c) needs a way to mark the end of the drain in order to toggle
>> io_limits_disabled correctly.
>
>Is this a bug fix? I.e. do we need to Cc qemu-stable@?
>
>Fam

No that's not needed, throttle is not in 2.10. The bug in this case is 
that the drain would wait for the throttled requests to be completed as 
they were scheduled by the I/O throttling instead of restarting the 
queue and scheduling them right away.