From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTWBZ-0004En-Sr for qemu-devel@nongnu.org; Mon, 15 Sep 2014 09:19:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTWBU-0006u6-Q8 for qemu-devel@nongnu.org; Mon, 15 Sep 2014 09:19:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTWBU-0006sI-Hb for qemu-devel@nongnu.org; Mon, 15 Sep 2014 09:19:12 -0400 From: Markus Armbruster References: <1410620427-20089-1-git-send-email-armbru@redhat.com> <1410620427-20089-2-git-send-email-armbru@redhat.com> <20140915120051.GC22086@nodalink.com> Date: Mon, 15 Sep 2014 15:19:04 +0200 In-Reply-To: <20140915120051.GC22086@nodalink.com> (=?utf-8?Q?=22Beno?= =?utf-8?Q?=C3=AEt?= Canet"'s message of "Mon, 15 Sep 2014 12:00:51 +0000") Message-ID: <87y4tlt41j.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 01/23] block: Split bdrv_new_root() off bdrv_new() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Beno=C3=AEt?= Canet Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com Beno=C3=AEt Canet writes: > On Sat, Sep 13, 2014 at 05:00:05PM +0200, Markus Armbruster wrote: >> Creating an anonymous BDS can't fail. Make that obvious. >>=20 >> Signed-off-by: Markus Armbruster >> --- >> block.c | 28 +++++++++++++++++++--------- >> block/iscsi.c | 2 +- >> block/vvfat.c | 2 +- >> blockdev.c | 2 +- >> hw/block/xen_disk.c | 2 +- >> include/block/block.h | 3 ++- >> qemu-img.c | 6 +++--- >> qemu-io.c | 2 +- >> qemu-nbd.c | 2 +- >> 9 files changed, 30 insertions(+), 19 deletions(-) >>=20 >> diff --git a/block.c b/block.c >> index 02ea90f..4fe3b62 100644 >> --- a/block.c >> +++ b/block.c >> @@ -336,10 +336,11 @@ void bdrv_register(BlockDriver *bdrv) >> } >>=20=20 > >> /* create a new block device (by default it is empty) */ > I wonder if this comment is stale. > What is the emptiness of a block device anyway ? No medium. To make an empty BDS non-empty, bdrv_open() an image. To make it empty again, bdrv_close() it. The comment still applies. In the BB world, there's no such thing as an empty BDS. A BB without medium simply has no BDS. This series doesn't get us there, it's just a first step. When we get there, bdrv_new() will be folded into bdrv_open(), and bdrv_close() into bdrv_delete(). [...] > Reviewed-by: Beno=C3=AEt Canet Thanks!