diff options
author | Vladimir Sementsov-Ogievskiy | 2021-02-05 17:37:11 +0100 |
---|---|---|
committer | Eric Blake | 2021-02-12 16:45:18 +0100 |
commit | bd54669a4adf0931be3b0574d07ce4809bf67807 (patch) | |
tree | 33a561ed7db50b46253dd372f20781998bcc4ec3 /include/block/block_int.h | |
parent | io: error_prepend() in qio_channel_readv_full_all() causes segfault (diff) | |
download | qemu-bd54669a4adf0931be3b0574d07ce4809bf67807.tar.gz qemu-bd54669a4adf0931be3b0574d07ce4809bf67807.tar.xz qemu-bd54669a4adf0931be3b0574d07ce4809bf67807.zip |
block: add new BlockDriver handler: bdrv_cancel_in_flight
It will be used to stop retrying NBD requests on mirror cancel.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210205163720.887197-2-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include/block/block_int.h')
-rw-r--r-- | include/block/block_int.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index 22a2789d35..88e4111939 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -353,6 +353,15 @@ struct BlockDriver { int64_t *map, BlockDriverState **file); /* + * This informs the driver that we are no longer interested in the result + * of in-flight requests, so don't waste the time if possible. + * + * One example usage is to avoid waiting for an nbd target node reconnect + * timeout during job-cancel. + */ + void (*bdrv_cancel_in_flight)(BlockDriverState *bs); + + /* * Invalidate any cached meta-data. */ void coroutine_fn (*bdrv_co_invalidate_cache)(BlockDriverState *bs, |