On Wed 13 Mar 2019 03:32:09 PM CET, Alberto Garcia wrote:
>>> > 2. And therefore, why we just don't call bdrv_replace_node(top,
>>> > base, errp) from bdrv_drop_intermediate?
>>> 
>>> I think that would not call role->update_filename().
>>
>> And role->update_filename() involves I/O, so you can't roll back
>> across it anyway. I think this was the reason why we didn't roll back
>> the in-memory state either, it would become inconsistent with what is
>> on the disk.
>
> But I think at least for the bdrv_check_update_perm() case we should
> call bdrv_abort_perm_update() on all nodes if things fail, and we're
> currently not doing it.

Forget this, bdrv_replace_child() already sets the new permissions after
every iteration of the loop, so the only place that needs to call
bdrv_abort_perm_update() is where we are doing it already.

Berto

Reply via email to