[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 01/11] block: add new BlockDriver handler: bdrv_cancel_in_fli

From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH 01/11] block: add new BlockDriver handler: bdrv_cancel_in_flight
Date: Thu, 21 Jan 2021 21:50:43 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

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 <vsementsov@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 
+     * job-cancel.

One example usage is to avoid waiting for an nbd target node reconnect
timeout during job-cancel.

Reviewed-by: Eric Blake <eblake@redhat.com>

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]