From fe1a9cbc339bb54d20f1ca4c1e8788d16944d5cf Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Wed, 16 Mar 2016 19:54:40 +0100 Subject: 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 Signed-off-by: Kevin Wolf --- block.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'block.c') diff --git a/block.c b/block.c index 582a9e8ce3..91c006a3d3 100644 --- a/block.c +++ b/block.c @@ -2521,26 +2521,6 @@ ro_cleanup: return ret; } -int bdrv_commit_all(void) -{ - BlockDriverState *bs; - - QTAILQ_FOREACH(bs, &bdrv_states, device_list) { - AioContext *aio_context = bdrv_get_aio_context(bs); - - aio_context_acquire(aio_context); - if (bs->drv && bs->backing) { - int ret = bdrv_commit(bs); - if (ret < 0) { - aio_context_release(aio_context); - return ret; - } - } - aio_context_release(aio_context); - } - return 0; -} - /* * Return values: * 0 - success -- cgit v1.2.3