qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-stable] [PATCH 3/4] io: add locking constraints check into bdr


From: Stefan Hajnoczi
Subject: Re: [Qemu-stable] [PATCH 3/4] io: add locking constraints check into bdrv_drain to ensure locking
Date: Fri, 30 Oct 2015 15:43:24 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

On Wed, Oct 28, 2015 at 06:01:04PM +0300, Denis V. Lunev wrote:
> as described in the comment of the function
> 
> Signed-off-by: Denis V. Lunev <address@hidden>
> CC: Stefan Hajnoczi <address@hidden>
> CC: Paolo Bonzini <address@hidden>
> ---
>  block/io.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/block/io.c b/block/io.c
> index 5ac6256..2e98d45 100644
> --- a/block/io.c
> +++ b/block/io.c
> @@ -247,12 +247,15 @@ bool bdrv_requests_pending(BlockDriverState *bs)
>  void bdrv_drain(BlockDriverState *bs)
>  {
>      bool busy = true;
> +    AioContext *aio_context = bdrv_get_aio_context(bs);
> +
> +    assert(aio_context_is_locked(aio_context));

Cool, thanks!  This is a useful assertion to have.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]