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 <mre...@redhat.com> >> Reviewed-by: Eric Blake <ebl...@redhat.com> >> Reviewed-by: Alberto Garcia <be...@igalia.com> >> --- >> 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