Loading block.c +0 −20 Original line number Diff line number Diff line Loading @@ -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 Loading block/block-backend.c +38 −6 Original line number Diff line number Diff line Loading @@ -904,11 +904,6 @@ int blk_flush(BlockBackend *blk) return bdrv_flush(blk->bs); } int blk_flush_all(void) { return bdrv_flush_all(); } void blk_drain(BlockBackend *blk) { if (blk->bs) { Loading Loading @@ -1357,5 +1352,42 @@ BlockBackendRootState *blk_get_root_state(BlockBackend *blk) int blk_commit_all(void) { return bdrv_commit_all(); BlockBackend *blk = NULL; while ((blk = blk_all_next(blk)) != NULL) { AioContext *aio_context = blk_get_aio_context(blk); aio_context_acquire(aio_context); if (blk_is_inserted(blk) && blk->bs->backing) { int ret = bdrv_commit(blk->bs); if (ret < 0) { aio_context_release(aio_context); return ret; } } aio_context_release(aio_context); } return 0; } int blk_flush_all(void) { BlockBackend *blk = NULL; int result = 0; while ((blk = blk_all_next(blk)) != NULL) { AioContext *aio_context = blk_get_aio_context(blk); int ret; aio_context_acquire(aio_context); if (blk_is_inserted(blk)) { ret = blk_flush(blk); if (ret < 0 && !result) { result = ret; } } aio_context_release(aio_context); } return result; } block/io.c +0 −20 Original line number Diff line number Diff line Loading @@ -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; Loading include/block/block.h +0 −2 Original line number Diff line number Diff line Loading @@ -274,7 +274,6 @@ int64_t bdrv_get_allocated_file_size(BlockDriverState *bs); void bdrv_get_geometry(BlockDriverState *bs, uint64_t *nb_sectors_ptr); void bdrv_refresh_limits(BlockDriverState *bs, Error **errp); int bdrv_commit(BlockDriverState *bs); int bdrv_commit_all(void); int bdrv_change_backing_file(BlockDriverState *bs, const char *backing_file, const char *backing_fmt); void bdrv_register(BlockDriver *bdrv); Loading Loading @@ -373,7 +372,6 @@ int bdrv_inactivate_all(void); /* Ensure contents are flushed to disk. */ 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); Loading stubs/Makefile.objs +1 −1 Original line number Diff line number Diff line stub-obj-y += arch-query-cpu-def.o stub-obj-y += bdrv-commit-all.o stub-obj-y += blk-commit-all.o stub-obj-y += blockdev-close-all-bdrv-states.o stub-obj-y += clock-warp.o stub-obj-y += cpu-get-clock.o Loading Loading
block.c +0 −20 Original line number Diff line number Diff line Loading @@ -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 Loading
block/block-backend.c +38 −6 Original line number Diff line number Diff line Loading @@ -904,11 +904,6 @@ int blk_flush(BlockBackend *blk) return bdrv_flush(blk->bs); } int blk_flush_all(void) { return bdrv_flush_all(); } void blk_drain(BlockBackend *blk) { if (blk->bs) { Loading Loading @@ -1357,5 +1352,42 @@ BlockBackendRootState *blk_get_root_state(BlockBackend *blk) int blk_commit_all(void) { return bdrv_commit_all(); BlockBackend *blk = NULL; while ((blk = blk_all_next(blk)) != NULL) { AioContext *aio_context = blk_get_aio_context(blk); aio_context_acquire(aio_context); if (blk_is_inserted(blk) && blk->bs->backing) { int ret = bdrv_commit(blk->bs); if (ret < 0) { aio_context_release(aio_context); return ret; } } aio_context_release(aio_context); } return 0; } int blk_flush_all(void) { BlockBackend *blk = NULL; int result = 0; while ((blk = blk_all_next(blk)) != NULL) { AioContext *aio_context = blk_get_aio_context(blk); int ret; aio_context_acquire(aio_context); if (blk_is_inserted(blk)) { ret = blk_flush(blk); if (ret < 0 && !result) { result = ret; } } aio_context_release(aio_context); } return result; }
block/io.c +0 −20 Original line number Diff line number Diff line Loading @@ -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; Loading
include/block/block.h +0 −2 Original line number Diff line number Diff line Loading @@ -274,7 +274,6 @@ int64_t bdrv_get_allocated_file_size(BlockDriverState *bs); void bdrv_get_geometry(BlockDriverState *bs, uint64_t *nb_sectors_ptr); void bdrv_refresh_limits(BlockDriverState *bs, Error **errp); int bdrv_commit(BlockDriverState *bs); int bdrv_commit_all(void); int bdrv_change_backing_file(BlockDriverState *bs, const char *backing_file, const char *backing_fmt); void bdrv_register(BlockDriver *bdrv); Loading Loading @@ -373,7 +372,6 @@ int bdrv_inactivate_all(void); /* Ensure contents are flushed to disk. */ 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); Loading
stubs/Makefile.objs +1 −1 Original line number Diff line number Diff line stub-obj-y += arch-query-cpu-def.o stub-obj-y += bdrv-commit-all.o stub-obj-y += blk-commit-all.o stub-obj-y += blockdev-close-all-bdrv-states.o stub-obj-y += clock-warp.o stub-obj-y += cpu-get-clock.o Loading