qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 10/12] block.c: add subtree_drains where needed


From: Paolo Bonzini
Subject: Re: [PATCH 10/12] block.c: add subtree_drains where needed
Date: Wed, 2 Feb 2022 18:38:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

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

[Prev in Thread] Current Thread [Next in Thread]