mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
c90e3512a4
commit
bd54669a4a
3 changed files with 23 additions and 0 deletions
|
@ -352,6 +352,15 @@ struct BlockDriver {
|
|||
bool want_zero, int64_t offset, int64_t bytes, int64_t *pnum,
|
||||
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.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue