qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 06/23] block: Make BlockBackend own its Block


From: Benoît Canet
Subject: Re: [Qemu-devel] [PATCH v2 06/23] block: Make BlockBackend own its BlockDriverState
Date: Tue, 16 Sep 2014 12:56:44 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

>          /* blkdev->bs is not create by us, we get a reference
>           * so we can bdrv_unref() unconditionally */
> -        bdrv_ref(blkdev->bs);

> +        /* Except we don't bdrv_unref() anymore, we blk_unref().
Is this dot extra ?                                               ^
The following line seems to make better sense without this dot and the initial 
cap.
> +         * Conditionally, because we can't easily blk_ref() here.

> @@ -712,9 +711,7 @@ static int img_check(int argc, char **argv)
>  
>  fail:
>      qapi_free_ImageCheck(check);
> -    bdrv_unref(bs);
>      blk_unref(blk);
> -
Spurious blank line removal here.

> @@ -483,9 +481,6 @@ int main(int argc, char **argv)
>       */
>      bdrv_drain_all();
>  
> -    if (qemuio_bs) {
> -        bdrv_unref(qemuio_bs);
> -    }
>      blk_unref(qemuio_blk);
>      g_free(readline_state);
>      return 0;
> diff --git a/qemu-nbd.c b/qemu-nbd.c
> index fa8a7d0..0c496af 100644
> --- a/qemu-nbd.c
> +++ b/qemu-nbd.c
> @@ -771,7 +771,6 @@ int main(int argc, char **argv)

Well that does seems to simplify things a lot.



reply via email to

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