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 inside a drain_all section. > Removal of a BDS doesn't require any action because it's gone afterwards > anyway.
Ok, now I see (I think) why you chose the recursive check for in-flight requests. The higher quiesce_count is not a problem, but I am still not convinced about the recursion. Paolo > This change means that some nodes get a higher bs->quiesce_count now > because each node propagates its individual drain to all of its parents. > In the old subtree drain, propagation back to the parent that made the > recursive drain request was avoided. While this isn't perfectly > beautiful, accepting the higher counts seems preferable to adding drain > code to multiple other places that modify the graph.