qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 01/23] block: Split bdrv_new_root() off bdrv_


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2 01/23] block: Split bdrv_new_root() off bdrv_new()
Date: Mon, 15 Sep 2014 15:19:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Benoît Canet <address@hidden> writes:

> On Sat, Sep 13, 2014 at 05:00:05PM +0200, Markus Armbruster wrote:
>> Creating an anonymous BDS can't fail.  Make that obvious.
>> 
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>>  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(-)
>> 
>> 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)
>>  }
>>  
>
>>  /* 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ît Canet <address@hidden>

Thanks!



reply via email to

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