qemu-e2k/hw/block
Kevin Wolf a527e312b5 vhost-user-blk: Implement reconnection during realize
Commit dabefdd6 removed code that was supposed to try reconnecting
during .realize(), but actually just crashed and had several design
problems.

This adds the feature back without the crash in simple cases while also
fixing some design problems: Reconnection is now only tried if there was
a problem with the connection and not an error related to the content
(which would fail again the same way in the next attempt). Reconnection
is limited to three attempts (four with the initial attempt) so that we
won't end up in an infinite loop if a problem is permanent. If the
backend restarts three times in the very short time window of device
initialisation, we have bigger problems and erroring out is the right
course of action.

In the case that a connection error occurs and we reconnect, the error
message is printed using error_report_err(), but otherwise ignored.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20210609154658.350308-8-kwolf@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2021-06-30 13:21:22 +02:00
..
dataplane docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
Kconfig hw/block/fdc: Extract SysBus floppy controllers to fdc-sysbus.c 2021-06-25 08:53:28 -04:00
block.c block: make BlockConf size props 32bit and accept size suffixes 2020-06-17 14:53:40 +02:00
cdrom.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
ecc.c vmstate: Constify some VMStateDescriptions 2021-05-02 17:24:50 +02:00
fdc-internal.h hw/block/fdc: Declare shared prototypes in fdc-internal.h 2021-06-25 08:53:28 -04:00
fdc-isa.c hw/block/fdc: Add description to floppy controllers 2021-06-25 08:53:28 -04:00
fdc-sysbus.c hw/block/fdc: Add description to floppy controllers 2021-06-25 08:53:28 -04:00
fdc.c hw/block/fdc: Extract SysBus floppy controllers to fdc-sysbus.c 2021-06-25 08:53:28 -04:00
hd-geometry.c block: Remove blk_pread_unthrottled() 2019-08-16 10:25:16 +02:00
m25p80.c hw/block: m25p80: Add support for mt25ql02g and mt25qu02g 2021-05-01 10:03:52 +02:00
meson.build hw/block/fdc: Extract SysBus floppy controllers to fdc-sysbus.c 2021-06-25 08:53:28 -04:00
nand.c block: Separate blk_is_writable() and blk_supports_write_perm() 2021-01-27 20:45:20 +01:00
onenand.c block: Separate blk_is_writable() and blk_supports_write_perm() 2021-01-27 20:45:20 +01:00
pflash_cfi01.c hw/block/pflash_cfi: Replace DPRINTF with trace events 2021-03-18 11:16:31 +01:00
pflash_cfi02.c hw/block/pflash_cfi02: Do not create aliases when not necessary 2021-05-11 18:11:02 +02:00
swim.c block: Separate blk_is_writable() and blk_supports_write_perm() 2021-01-27 20:45:20 +01:00
tc58128.c hw/sh4: Add missing license 2021-03-06 16:18:42 +01:00
trace-events hw/block/fdc: Extract SysBus floppy controllers to fdc-sysbus.c 2021-06-25 08:53:28 -04:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vhost-user-blk.c vhost-user-blk: Implement reconnection during realize 2021-06-30 13:21:22 +02:00
virtio-blk.c virtio-blk: Constify VirtIOFeature feature_sizes[] 2021-05-14 08:12:09 -04:00
xen-block.c xen-block: Use specific blockdev driver 2021-05-10 13:43:58 +01:00
xen_blkif.h xen: Import other xen/io/*.h 2019-06-24 10:42:30 +01:00