summaryrefslogtreecommitdiffstats
path: root/include/block/block.h
diff options
context:
space:
mode:
authorDaniel Henrique Barboza2020-01-30 22:39:05 +0100
committerKevin Wolf2020-03-11 15:54:38 +0100
commite1d7f8bb1ec0c6911dcea81641ce6139dbded02d (patch)
tree75543ff6a5a7d2191d600f12ad00a20595835380 /include/block/block.h
parentblock: introducing 'bdrv_co_delete_file' interface (diff)
downloadqemu-e1d7f8bb1ec0c6911dcea81641ce6139dbded02d.tar.gz
qemu-e1d7f8bb1ec0c6911dcea81641ce6139dbded02d.tar.xz
qemu-e1d7f8bb1ec0c6911dcea81641ce6139dbded02d.zip
block.c: adding bdrv_co_delete_file
Using the new 'bdrv_co_delete_file' interface, a pure co_routine function 'bdrv_co_delete_file' inside block.c can can be used in a way similar of the existing bdrv_create_file to to clean up a created file. We're creating a pure co_routine because the only caller of 'bdrv_co_delete_file' will be already in co_routine context, thus there is no need to add all the machinery to check for qemu_in_coroutine() and create a separated co_routine to do the job. Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20200130213907.2830642-3-danielhb413@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block/block.h')
-rw-r--r--include/block/block.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/block/block.h b/include/block/block.h
index cd6b5b95aa..e569a4d747 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -363,6 +363,7 @@ bool bdrv_is_backing_chain_frozen(BlockDriverState *bs, BlockDriverState *base,
int bdrv_freeze_backing_chain(BlockDriverState *bs, BlockDriverState *base,
Error **errp);
void bdrv_unfreeze_backing_chain(BlockDriverState *bs, BlockDriverState *base);
+int coroutine_fn bdrv_co_delete_file(BlockDriverState *bs, Error **errp);
typedef struct BdrvCheckResult {