diff options
| author | Stefan Hajnoczi | 2014-10-21 13:03:55 +0200 |
|---|---|---|
| committer | Stefan Hajnoczi | 2014-11-03 12:41:49 +0100 |
| commit | 5b98db0ad3ad2919c71572085d104765bad6c658 (patch) | |
| tree | b905002b02a513dc4ec867313c762d949a89ef4b /include | |
| parent | blockjob: add block_job_defer_to_main_loop() (diff) | |
| download | qemu-5b98db0ad3ad2919c71572085d104765bad6c658.tar.gz qemu-5b98db0ad3ad2919c71572085d104765bad6c658.tar.xz qemu-5b98db0ad3ad2919c71572085d104765bad6c658.zip | |
block: add bdrv_drain()
Now that op blockers are in use, we can ensure that no other sources are
generating I/O on a BlockDriverState. Therefore it is possible to drain
requests for a single BDS.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 1413889440-32577-7-git-send-email-stefanha@redhat.com
Diffstat (limited to 'include')
| -rw-r--r-- | include/block/block.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/block/block.h b/include/block/block.h index 5d13282fa9..13e453736c 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -334,6 +334,7 @@ int bdrv_flush(BlockDriverState *bs); int coroutine_fn bdrv_co_flush(BlockDriverState *bs); int bdrv_flush_all(void); void bdrv_close_all(void); +void bdrv_drain(BlockDriverState *bs); void bdrv_drain_all(void); int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors); |
