Am 19.10.2015 um 17:53 hat Max Reitz geschrieben:
> Signed-off-by: Max Reitz <[email protected]>
> ---
> blockdev.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
> qapi/block-core.json | 23 +++++++++++++++++++++++
> qmp-commands.hx | 39 +++++++++++++++++++++++++++++++++++++++
> 3 files changed, 111 insertions(+)
> + bs = blk_bs(blk);
> + if (bs) {
> + aio_context = bdrv_get_aio_context(bs);
> + aio_context_acquire(aio_context);
> +
> + if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_EJECT, errp)) {
> + goto out;
> + }
Is this blocker really for protecting against opening the tray? I think
the BDS shouldn't care about whether the guest can access it. So it's
probably more about preventing a bdrv_close() from happening, i.e. it
would be relevant only for the blockdev-remove-medium command.
Kevin