[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plans to bring QMP 'x-blockdev-reopen' out of experimental?
From: |
Alberto Garcia |
Subject: |
Re: Plans to bring QMP 'x-blockdev-reopen' out of experimental? |
Date: |
Fri, 04 Dec 2020 15:03:20 +0100 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Wed 02 Dec 2020 06:51:21 PM CET, Kevin Wolf wrote:
>> I had tried this already and it does work when inserting the filter (we
>> know that 'hd0-file' is about to be detached from the parent so we can
>> put it in the list) but I don't think it's so easy if we want to remove
>> the filter, i.e.
>>
>> hd0 -> throttle -> hd0-file ======> hd0 -> hd0-file
>>
>> In this case we get a similar error, we want to make hd0-file a child of
>> hd0 but it is being used by the throttle filter.
>>
>> Telling bdrv_check_update_perm() to ignore hd0's current child
>> (throttle) won't solve the problem.
>
> Isn't this the very same case as removing e.g. a mirror filter from the
> chain? I'm sure we have already solved this somewhere.
>
> Hm, no, it might actually be different in that the throttle node
> survives this, so we do have to check that the resulting graph is
> valid. Do we need a combined operation to remove the throttle node
> from the graph and immediately delete it?
What kind of API are you thinking about?
One basic problem with inserting filter nodes (as opposed to replacing a
node with a different one) is that we have a protocol BDS used twice at
the same time, e.g.
hd0 -> hd0-file
throttle -> hd0-file
And then we would reopen hd0 and do the change, but ideally one would
prefer to avoid having hd0-file twice.
There's also the x-blockdev-change function (currently for Quorum only),
I wonder if it could be a better fit for this use case.
Berto