Skip to content

RFC NBD reconnect

Vladimir Sementsov-Ogievskiy qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3block: add bdrv_reconnectblock.c include/block/block.h include/block/block_int.h+27 -00 replies
2/3nbd: add .bdrv_reconnect handlerblock/nbd.c+44 -160 replies
3/3blk: add 'reconnect' error actionblock/block-backend.c hw/scsi/scsi-disk.c qapi/block-core.json+52 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [RFC 0/3] NBD reconnect

Hi all.

Here is a draft of NBD reconnect, to negotiate overall design. It is done through implementing new error action: reconnect.

New action works as follows:

Firstly, not stopping the vm, it tries to bdrv_reconnect several times with given pause. Then, if we failed to reconnect fallthrough to 'stop' error action.

My RFC doubts:
1. introducing new .bdrv_reconnect(). Is bdrv_reopen() appropriate for the feature? I'm not sure, because it is not recursive, and don't really reopen files..
2. introducing new error action. Anyway, I'll have to add some configuration parameters (see 03), so, the feature may be just an option to 'stop' action, rather than separate error action.

Vladimir Sementsov-Ogievskiy (3):
block: add bdrv_reconnect
nbd: add .bdrv_reconnect handler
blk: add 'reconnect' error action

 qapi/block-core.json      |  4 ++--
 include/block/block.h     |  2 ++
 include/block/block_int.h |  3 +++
 block.c                   | 22 +++++++++++++++++
 block/block-backend.c     | 48 ++++++++++++++++++++++++++++++++++++-
 block/nbd.c               | 60 ++++++++++++++++++++++++++++++++++-------------
 hw/scsi/scsi-disk.c       |  4 +++-
 7 files changed, 123 insertions(+), 20 deletions(-)
Signature · 1 line
2.11.1