• K
    block: Unify order in drain functions · 60369b86
    Kevin Wolf 提交于
    Drain requests are propagated to child nodes, parent nodes and directly
    to the AioContext. The order in which this happened was different
    between all combinations of drain/drain_all and begin/end.
    
    The correct order is to keep children only drained when their parents
    are also drained. This means that at the start of a drained section, the
    AioContext needs to be drained first, the parents second and only then
    the children. The correct order for the end of a drained section is the
    opposite.
    
    This patch changes the three other functions to follow the example of
    bdrv_drained_begin(), which is the only one that got it right.
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
    60369b86
io.c 82.1 KB