]> git.proxmox.com Git - mirror_qemu.git/commit
block: reintroduce bdrv_flush_all
authorJohn Snow <jsnow@redhat.com>
Fri, 23 Sep 2016 01:45:50 +0000 (21:45 -0400)
committerKevin Wolf <kwolf@redhat.com>
Thu, 29 Sep 2016 12:13:13 +0000 (14:13 +0200)
commit4085f5c7a239567a292876f46cb59d9b19bcf6ac
tree885542475fcdd254585185f936d093b03cb64bdc
parentc640f2849ee8775fe1bbd7a2772610aa77816f9f
block: reintroduce bdrv_flush_all

Commit fe1a9cbc moved the flush_all routine from the bdrv layer to the
block-backend layer. In doing so, however, the semantics of the routine
changed slightly such that flush_all now used blk_flush instead of
bdrv_flush.

blk_flush can fail if the attached device model reports that it is not
"available," (i.e. the tray is open.) This changed the semantics of
flush_all such that it can now fail for e.g. open CDROM drives.

Reintroduce bdrv_flush_all to regain the old semantics without having to
alter the behavior of blk_flush or blk_flush_all, which are already
'doing the right thing.'

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Acked-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/io.c
include/block/block.h