[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 1/2] block: Allow x-blockdev-del on a BB with
Re: [Qemu-block] [PATCH v2 1/2] block: Allow x-blockdev-del on a BB with a monitor-owned BDS
Thu, 25 Feb 2016 12:11:20 +0100
Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu)
On Wed 24 Feb 2016 05:15:11 PM CET, Max Reitz wrote:
>> When x-blockdev-del is performed on a BlockBackend that has inserted
>> media it will only succeed if the BDS doesn't have any additional
>> The only problem with this is that if the BDS was created separately
>> using blockdev-add then the backend won't be able to be destroyed
>> unless the BDS is ejected first. This is an unnecessary restriction.
> Is it? In order to get into this situation, you need to execute:
> blockdev-add (BB/BDS), blockdev-add (BDS/BB), x-blockdev-insert-medium
> Now, in order to unravel it, you currently need:
> x-blockdev-remove-medium (or eject), x-blockdev-del (BB/BDS),
> x-blockdev-del (BDS/BB)
> So you need to execute the x-blockdev-remove-medium because you did an
> x-blockdev-insert-medium before. That seems reasonable to me, and not
> very superfluous.
I think your case is reasonable, but it's not the only way to get into
this situation. See for example this one:
blockdev-add 'drive0', 'node0'
blockdev-snapshot node='node0' overlay='node1'
Now you have 'drive0' with 'node0' <- 'node1'.
You cannot simply remove 'drive0', you need to eject 'node1' first and
then you can remove 'drive0' and 'node1'.
Re: [Qemu-block] [PATCH v2 0/2] Allow x-blockdev-del on a BB with a monitor-owned BDS, Alberto Garcia, 2016/02/24