diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2018-03-01 17:36:18 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-03-09 15:17:47 +0100 |
commit | 2b148f392b2bfeba76d3e6d9607c3bd072350e8c (patch) | |
tree | a28af16d3aef4b004a257488e7503ca31f6bc51c /block/nfs.c | |
parent | 9fb4dfc570ce3b013830321b8b91ae2ea991d768 (diff) |
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 <pbonzini@redhat.com>
Message-Id: <1516279431-30424-6-git-send-email-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/nfs.c')
-rw-r--r-- | block/nfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/nfs.c b/block/nfs.c index 1d82ff5042..7433d25856 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -876,8 +876,8 @@ static void nfs_refresh_filename(BlockDriverState *bs, QDict *options) } #ifdef LIBNFS_FEATURE_PAGECACHE -static void nfs_invalidate_cache(BlockDriverState *bs, - Error **errp) +static void coroutine_fn nfs_co_invalidate_cache(BlockDriverState *bs, + Error **errp) { NFSClient *client = bs->opaque; nfs_pagecache_invalidate(client->context, client->fh); @@ -910,7 +910,7 @@ static BlockDriver bdrv_nfs = { .bdrv_refresh_filename = nfs_refresh_filename, #ifdef LIBNFS_FEATURE_PAGECACHE - .bdrv_invalidate_cache = nfs_invalidate_cache, + .bdrv_co_invalidate_cache = nfs_co_invalidate_cache, #endif }; |