All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Alberto Garcia <berto@igalia.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>,
	sochin jiang <sochin.jiang@huawei.com>
Subject: Re: [Qemu-devel] [PATCH 1/3] block: Check for inserted BlockDriverState in blk_io_limits_disable()
Date: Fri, 10 Nov 2017 21:16:06 +0100	[thread overview]
Message-ID: <aacee0cf-d5bc-0279-da04-8d898dbc18a4@redhat.com> (raw)
In-Reply-To: <0d3a67ce8d948bb33e08672564714dcfb76a3d8c.1510339534.git.berto@igalia.com>

[-- Attachment #1: Type: text/plain, Size: 832 bytes --]

On 2017-11-10 19:54, Alberto Garcia wrote:
> When you set I/O limits using block_set_io_throttle or the command
> line throttling.* options they are kept in the BlockBackend regardless
> of whether a BlockDriverState is attached to the backend or not.
> 
> Therefore when removing the limits using blk_io_limits_disable() we
> need to check if there's a BDS before attempting to drain it, else it
> will crash QEMU. This can be reproduced very easily using HMP:
> 
>      (qemu) drive_add 0 if=none,throttling.iops-total=5000
>      (qemu) drive_del none0
> 
> Reported-by: sochin jiang <sochin.jiang@huawei.com>
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
>  block/block-backend.c | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)

Reviewed-by: Max Reitz <mreitz@redhat.com>


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

  reply	other threads:[~2017-11-10 20:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-10 18:54 [Qemu-devel] [PATCH 0/3] Fix throttling crashes in BlockBackend with no BlockDriverState Alberto Garcia
2017-11-10 18:54 ` [Qemu-devel] [PATCH 1/3] block: Check for inserted BlockDriverState in blk_io_limits_disable() Alberto Garcia
2017-11-10 20:16   ` Max Reitz [this message]
2017-11-10 18:54 ` [Qemu-devel] [PATCH 2/3] block: Leave valid throttle timers when removing a BDS from a backend Alberto Garcia
2017-11-10 20:27   ` Max Reitz
2017-11-10 22:06   ` Alberto Garcia
2017-11-10 22:08     ` Max Reitz
2017-11-10 22:32       ` Alberto Garcia
2017-11-10 18:54 ` [Qemu-devel] [PATCH 3/3] qemu-iotests: Test I/O limits with removable media Alberto Garcia
2017-11-10 20:34   ` Max Reitz
2017-11-10 22:21   ` Max Reitz
2017-11-13 14:08     ` Alberto Garcia
2017-11-13 15:49   ` Stefan Hajnoczi
2017-11-13 15:57     ` Alberto Garcia
2017-11-13 15:49 ` [Qemu-devel] [PATCH 0/3] Fix throttling crashes in BlockBackend with no BlockDriverState Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aacee0cf-d5bc-0279-da04-8d898dbc18a4@redhat.com \
    --to=mreitz@redhat.com \
    --cc=berto@igalia.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sochin.jiang@huawei.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.