block: replace bdrv_states iteration with bdrv_next()
commit4f5472cb2d3d37ec3282cc3829612f9d696c2df7
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 28 Apr 2015 13:27:49 +0000 (28 14:27 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 28 Apr 2015 13:36:17 +0000 (28 15:36 +0200)
tree9c20acb95e44dd9859dae9311a756f400171cd4e
parent7237aecd7e8fcc3ccf7fded77b6c127b4df5d3ac
block: replace bdrv_states iteration with bdrv_next()

The bdrv_states list is a static variable in block.c.

bdrv_drain_all() and bdrv_flush_all() use this variable to iterate over
all drives.

The next patch will move bdrv_drain_all() and bdrv_flush_all() out of
block.c so it's necessary to switch to the public bdrv_next() interface.

Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c