diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-02-05 19:37:11 +0300 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2021-02-12 09:45:18 -0600 |
commit | bd54669a4adf0931be3b0574d07ce4809bf67807 (patch) | |
tree | 33a561ed7db50b46253dd372f20781998bcc4ec3 /block | |
parent | c90e3512a4683345a8e7074961d8275ceaec578d (diff) | |
download | qemu-bd54669a4adf0931be3b0574d07ce4809bf67807.zip qemu-bd54669a4adf0931be3b0574d07ce4809bf67807.tar.gz qemu-bd54669a4adf0931be3b0574d07ce4809bf67807.tar.bz2 |
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 'block')
-rw-r--r-- | block/io.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -3460,3 +3460,14 @@ out: return ret; } + +void bdrv_cancel_in_flight(BlockDriverState *bs) +{ + if (!bs || !bs->drv) { + return; + } + + if (bs->drv->bdrv_cancel_in_flight) { + bs->drv->bdrv_cancel_in_flight(bs); + } +} |