Re: [Qemu-devel] [PATCH 18/19] block: Allow graph changes in bdrv_drain_all_begin/end sections

2018-04-12 Thread Paolo Bonzini
On 11/04/2018 18:39, Kevin Wolf wrote: > The much easier and more obviously correct way is to fundamentally > change the way the functions work: Iterate over all BlockDriverStates, > no matter who owns them, and drain them individually. Compensation is > only necessary when a new BDS is created ins

[Qemu-devel] [PATCH 18/19] block: Allow graph changes in bdrv_drain_all_begin/end sections

2018-04-11 Thread Kevin Wolf
bdrv_drain_all_*() used bdrv_next() to iterate over all root nodes and did a subtree drain for each of them. This works fine as long as the graph is static, but sadly, reality looks different. If the graph changes so that root nodes are added or removed, we would have to compensate for this. bdrv_