From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTsJP-0007Mm-TT for qemu-devel@nongnu.org; Tue, 16 Sep 2014 08:56:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTsJJ-0006KI-LC for qemu-devel@nongnu.org; Tue, 16 Sep 2014 08:56:51 -0400 Received: from dew.nodalink.com ([95.130.14.197]:55818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTsJJ-0006Jk-FK for qemu-devel@nongnu.org; Tue, 16 Sep 2014 08:56:45 -0400 Date: Tue, 16 Sep 2014 12:56:44 +0000 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20140916125644.GC27495@nodalink.com> References: <1410620427-20089-1-git-send-email-armbru@redhat.com> <1410620427-20089-7-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1410620427-20089-7-git-send-email-armbru@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 06/23] block: Make BlockBackend own its BlockDriverState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, benoit.canet@nodalink.com > /* 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.