diff options
| author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2020-09-24 21:54:08 +0300 |
|---|---|---|
| committer | Stefan Hajnoczi <stefanha@redhat.com> | 2020-10-05 09:35:52 +0100 |
| commit | 5416645fcf82a6cf520a83c82b577137058aaf32 (patch) | |
| tree | 4815174ef415710cb0ad2000ba3ea6e051967dfe /include | |
| parent | eefffb0244eb72d9b21f30c521bb2ced72500131 (diff) | |
| download | focaccia-qemu-5416645fcf82a6cf520a83c82b577137058aaf32.tar.gz focaccia-qemu-5416645fcf82a6cf520a83c82b577137058aaf32.zip | |
block: return error-code from bdrv_invalidate_cache
This is the only coroutine wrapper from block.c and block/io.c which doesn't return a value, so let's convert it to the common behavior, to simplify moving to generated coroutine wrappers in a further commit. Also, bdrv_invalidate_cache is a void function, returning error only through **errp parameter, which is considered to be bad practice, as it forces callers to define and propagate local_err variable, so conversion is good anyway. This patch leaves the conversion of .bdrv_co_invalidate_cache() driver callbacks and bdrv_invalidate_cache_all() for another day. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200924185414.28642-2-vsementsov@virtuozzo.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/block/block.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h index 981ab5b314..81d591dd4c 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -460,7 +460,7 @@ void bdrv_aio_cancel_async(BlockAIOCB *acb); int bdrv_co_ioctl(BlockDriverState *bs, int req, void *buf); /* Invalidate any cached metadata used by image formats */ -void bdrv_invalidate_cache(BlockDriverState *bs, Error **errp); +int bdrv_invalidate_cache(BlockDriverState *bs, Error **errp); void bdrv_invalidate_cache_all(Error **errp); int bdrv_inactivate_all(void); |