block: Make bdrv_drain() driver callbacks non-recursive
commit7b6a3d35536f945c41aa62627cc295482606aa2e
authorKevin Wolf <kwolf@redhat.com>
Thu, 7 Dec 2017 11:20:10 +0000 (7 12:20 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 22 Dec 2017 14:05:31 +0000 (22 15:05 +0100)
treea563e0b74f85495d9124ecef92bd68383f226902
parent9a7e86c8048cecededa665b1ca55c7f217ed358c
block: Make bdrv_drain() driver callbacks non-recursive

bdrv_drained_begin() doesn't increase bs->quiesce_counter recursively
and also doesn't notify other parent nodes of children, which both means
that the child nodes are not actually drained, and bdrv_drained_begin()
is providing useful functionality only on a single node.

To keep things consistent, we also shouldn't call the block driver
callbacks recursively.

A proper recursive drain version that provides an actually working
drained section for child nodes will be introduced later.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
block/io.c