[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 02/38] blockdev: Allow creation of BDS trees
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH v4 02/38] blockdev: Allow creation of BDS trees without BB |
Date: |
Mon, 7 Sep 2015 18:38:12 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 07.09.2015 18:12, Kevin Wolf wrote:
> Am 20.07.2015 um 19:45 hat Max Reitz geschrieben:
>> If the "id" field is missing from the options given to blockdev-add,
>> just omit the BlockBackend and create the BlockDriverState tree alone.
>>
>> However, if "id" is missing, "node-name" must be specified; otherwise,
>> the BDS tree would no longer be accessible.
>
> We can probably lift this restriction once Jeff's auto-generated ID
> patches are in. However, allowing additional things is easy, so no
> objection here.
Maybe we can lift it, but I don't know. In order to know the node-name,
you'd have to do a query-named-block-nodes before blockdev-add and
another one afterwards, diff it, and thus obtain the ID. But maybe that
doesn't even work, since one blockdev-add operation usually adds
multiple BDSs at ones.
>> Many BDS options which are not parsed by bdrv_open() (like caching)
>> cannot be specified for these BB-less BDS trees yet. A future patch will
>> remove this limitation.
>
> This makes the command mostly useless, but that's okay.
Well, the future patch is part of this series, so yes, it is okay.
> We'll be working
> on converting flags to QDict options one by one and then it will start
> working.
>
> There is, however, one flag that doesn't correspond to an option or
> enable an additional feature that is simply missing until then. That one
> worries me a bit: BDRV_O_INCOMING. We should probably include it in this
> patch; or maybe better add another patch before this one which moves the
> setting of BDRV_O_INCOMING from blockdev_init() to bdrv_open_common().
Hm, probably so, yes. It's still missing at the end of this series, too.
However, as far as I can see, O_INCOMING is set only for the root BDS,
so moving it to bdrv_open_common() would probably change behavior,
though maybe that'd be a bug fix, actually.
Max
>> Signed-off-by: Max Reitz <address@hidden>
>> Reviewed-by: Eric Blake <address@hidden>
>> Reviewed-by: Alberto Garcia <address@hidden>
>> ---
>> blockdev.c | 44 +++++++++++++++++++++++++++++++-------------
>> qapi/block-core.json | 13 +++++++++----
>> tests/qemu-iotests/087 | 2 +-
>> tests/qemu-iotests/087.out | 4 ++--
>> 4 files changed, 43 insertions(+), 20 deletions(-)
>
> Kevin
>
signature.asc
Description: OpenPGP digital signature