On Sat 17 Oct 2015 08:06:19 PM CEST, Max Reitz wrote:
>> +if (blk_get_refcnt(blk) > 1 ||
>> +(bs && (bs->refcnt > 1 || !QLIST_EMPTY(&bs->parents {
>> +error_setg(errp, "Block device %s is being used", device);
>> +goto out;
>> +}
>
> I can't think of a way off th
On Sat 17 Oct 2015 08:23:26 PM CEST, Max Reitz wrote:
>> +void qmp_blockdev_del(const char *device, Error **errp)
>> +{
>> +AioContext *aio_context;
>> +BlockBackend *blk;
>> +BlockDriverState *bs;
>> +
>> +blk = blk_by_name(device);
>> +if (blk) {
>> +bs = blk_bs(blk);
On 13.10.2015 15:48, Alberto Garcia wrote:
> This is the companion to 'blockdev-add'. It allows deleting a
> BlockBackend with its associated BlockDriverState tree, or a
> BlockDriverState that is not attached to any backend.
>
> In either case, the command fails if the reference count is greater
On 13.10.2015 15:48, Alberto Garcia wrote:
> This is the companion to 'blockdev-add'. It allows deleting a
> BlockBackend with its associated BlockDriverState tree, or a
> BlockDriverState that is not attached to any backend.
>
> In either case, the command fails if the reference count is greater
This is the companion to 'blockdev-add'. It allows deleting a
BlockBackend with its associated BlockDriverState tree, or a
BlockDriverState that is not attached to any backend.
In either case, the command fails if the reference count is greater
than 1 or the BlockDriverState has any parents.
Sign