On Fri, Apr 22, 2016 at 07:42:38PM +0200, Kevin Wolf wrote:
> This removes the last part of I/O throttling from block/io.c and moves
> it to the BlockBackend.
> 
> Instead of having knowledge about throttling inside io.c, we can call a
> BdrvChild callback .drained_begin/end, which happens to drain the
> throttled requests for BlockBackend parents.
> 
> Signed-off-by: Kevin Wolf <kw...@redhat.com>
> ---
>  block/block-backend.c     | 32 +++++++++++++++++++++++++++-----
>  block/io.c                | 39 ++++++++++++++++++---------------------
>  include/block/block_int.h |  8 +++-----
>  3 files changed, 48 insertions(+), 31 deletions(-)

I'm confused about the naming.  BdrvChildRole.drained_begin/end and
bdrv_parent_drained_begin/end have nothing to do with
bdrv_drained_begin()/bdrv_drained_end()?

If these were callbacks that happened at bdrv_drained_begin/end time
then I could understand, but that doesn't seem to be the case.

What are the semantics of these callbacks?  Maybe we can find a clearer
name.  I think the point is not to "drain" (in the sense of completing
requests) but simply to restart queued requests?

Attachment: signature.asc
Description: PGP signature

Reply via email to