21.01.2021 01:27, Eric Blake wrote:
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote:
It will be used to stop retrying NBD requests on mirror cancel.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com>
---
include/block/block.h | 3 +++
include/block/block_int.h | 9 +++++++++
block/io.c | 11 +++++++++++
3 files changed, 23 insertions(+)
How does this relate to the recent addition of the QMP yank command?
Hmm. Don't know.. Looking in spec:
# Currently implemented yank instances:
# - nbd block device:
# Yanking it will shut down the connection to the nbd server without
# attempting to reconnect.
Looks like a close thing. But actually, I don't want to stop reconnecting
process, but only cancel some requests which we don't want to wait for. After
that, the nbd node may successfully reconnect and continue to work.
+++ b/include/block/block_int.h
@@ -344,6 +344,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 not more interested in in-flight
that we are no longer interested in the result of in-flight requests, so
+ * requests results, so don't waste the time if possible.
+ *
+ * The example usage is to not wait for nbd target nodedreconnect timeout
on
+ * job-cancel.
One example usage is to avoid waiting for an nbd target node reconnect
timeout during job-cancel.
Reviewed-by: Eric Blake <ebl...@redhat.com>
--
Best regards,
Vladimir