qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v5 10/31] block.c: modify .attach and .detach callbacks of ch


From: Hanna Reitz
Subject: Re: [PATCH v5 10/31] block.c: modify .attach and .detach callbacks of child_of_bds
Date: Thu, 16 Dec 2021 17:12:04 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 16.12.21 17:05, Emanuele Giuseppe Esposito wrote:


On 16/12/2021 15:57, Hanna Reitz wrote:
On 24.11.21 07:43, Emanuele Giuseppe Esposito wrote:
According to the assertions put in the previous patch, we should
first drain and then modify the ->children list. In this way
we prevent other iothreads to read the list while it is being
updated.

In this case, moving the drain won't cause any harm, because
child is a parameter of the drain function so it will still be
included in the operation, despite not being in the list.

Sounds good.

Uhm.. I don't think this is useful at all. I was thinking to drop this patch in v6.

My plans on subtree drains, ->children and ->parent lists are explained in "Removal of Aiocontext lock and usage of subtree drains in aborted transactions"

20211213104014.69858-1-eesposit@redhat.com/">https://patchew.org/QEMU/20211213104014.69858-1-eesposit@redhat.com/

And as I say there, commit d736f119da makes sure that it is safe to modify the graph even side a bdrv_subtree_drained_begin/end() section.
So this should be unnecessary.

Sounds good, too. :)

Hanna




reply via email to

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