From 2b148f392b2bfeba76d3e6d9607c3bd072350e8c Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 1 Mar 2018 17:36:18 +0100 Subject: block: convert bdrv_invalidate_cache callback to coroutine_fn QED's bdrv_invalidate_cache implementation would like to reuse functions that acquire/release the metadata locks. Call it from coroutine context to simplify the logic. Signed-off-by: Paolo Bonzini Message-Id: <1516279431-30424-6-git-send-email-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- include/block/block_int.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/block/block_int.h b/include/block/block_int.h index 64a5700..e391cae 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -224,7 +224,8 @@ struct BlockDriver { /* * Invalidate any cached meta-data. */ - void (*bdrv_invalidate_cache)(BlockDriverState *bs, Error **errp); + void coroutine_fn (*bdrv_co_invalidate_cache)(BlockDriverState *bs, + Error **errp); int (*bdrv_inactivate)(BlockDriverState *bs); /* -- cgit v1.1