diff options
author | Max Reitz <mreitz@redhat.com> | 2016-03-16 19:54:40 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-03-17 15:47:56 +0100 |
commit | fe1a9cbc339bb54d20f1ca4c1e8788d16944d5cf (patch) | |
tree | b82a37e5db7cc2b3ecfe080f25a6f99e62eb046d /block/io.c | |
parent | 7c735873d93ac18a6f06850c7ca6b3722b1b32c5 (diff) |
block: Move some bdrv_*_all() functions to BB
Move bdrv_commit_all() and bdrv_flush_all() to the BlockBackend level.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/io.c')
-rw-r--r-- | block/io.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/block/io.c b/block/io.c index a69bfc4197..5f9b6d623d 100644 --- a/block/io.c +++ b/block/io.c @@ -1445,26 +1445,6 @@ int coroutine_fn bdrv_co_write_zeroes(BlockDriverState *bs, BDRV_REQ_ZERO_WRITE | flags); } -int bdrv_flush_all(void) -{ - BlockDriverState *bs = NULL; - int result = 0; - - while ((bs = bdrv_next(bs))) { - AioContext *aio_context = bdrv_get_aio_context(bs); - int ret; - - aio_context_acquire(aio_context); - ret = bdrv_flush(bs); - if (ret < 0 && !result) { - result = ret; - } - aio_context_release(aio_context); - } - - return result; -} - typedef struct BdrvCoGetBlockStatusData { BlockDriverState *bs; BlockDriverState *base; |