On 2/2/22 16:37, Emanuele Giuseppe Esposito wrote:
So we have disk B with backing file C, and new disk A that wants to have
backing file C.

I think I understand what you mean, so in theory the operation would be
- create new child
- add child to A->children list
- add child to C->parents list

So in theory we need to
* drain A (without subtree), because it can't happen that child nodes of
   A have in-flight requests that look at A status (children list), right?
   In other words, if A has another node X, can a request in X inspect
   A->children
* drain C, as parents can inspect C status (like B). Same assumption
   here, C->children[x]->bs cannot have requests inspecting C->parents
   list?

In that case (i.e. if parents have to be drained, but children need not) bdrv_drained_begin_unlocked would be enough, right?

That would mean that ->children is I/O state but ->parents is global state. I think it's quite a bit more complicated to analyze and to understand.

Paolo

Reply via email to