opnsense-src/sys/dev/xen
Roger Pau Monné 590f093f74 xen/blkback: fix reconnection of backend
The hotplug script will be executed only once for each backend,
regardless of the frontend triggering reconnections. Fix blkback to
deal with the hotplug script being executed only once, so that
reconnections don't stall waiting for a hotplug script execution
that will never happen.

As a result of the fix move the initialization of dev_mode, dev_type
and dev_name to the watch callback, as they should be set only once
the first time the backend connects.

This fix is specially relevant for guests wanting to use UEFI OVMF
firmware, because OVMF will use Xen PV block devices and disconnect
afterwards, thus allowing them to be used by the guest OS. Without
this change the guest OS will stall waiting for the block backed to
attach.

Fixes: de0bad0001 ('blkback: add support for hotplug scripts')
Sponsored by: Citrix Systems R&D
(cherry picked from commit 4772e86beb)
2022-04-12 10:05:47 +02:00
..
balloon Convert vm_page_alloc() callers to use vm_page_alloc_noobj(). 2021-11-03 13:39:36 -04:00
blkback xen/blkback: fix reconnection of backend 2022-04-12 10:05:47 +02:00
blkfront xen/blkfront: Remove CTLFLAG_NEEDGIANT from sysctl. 2022-01-02 16:39:28 -05:00
console
control xen: allow limiting the amount of duplicated pending xenstore watches 2020-12-30 11:18:26 +01:00
debug
evtchn
gntdev Convert vm_page_alloc() callers to use vm_page_alloc_noobj(). 2021-11-03 13:39:36 -04:00
grant_table dev/xen: clean up empty lines in .c and .h files 2020-09-01 21:45:08 +00:00
netback xen/netback: do not attempt to connect in the Initialised state 2022-04-12 10:05:47 +02:00
netfront dev/xen: clean up empty lines in .c and .h files 2020-09-01 21:45:08 +00:00
pci
pcifront dev/xen: clean up empty lines in .c and .h files 2020-09-01 21:45:08 +00:00
privcmd xen/privcmd: implement the restrict ioctl 2021-01-11 16:33:27 +01:00
pvcpu
timer
xenpci dev/xen: clean up empty lines in .c and .h files 2020-09-01 21:45:08 +00:00
xenstore xen: allow limiting the amount of duplicated pending xenstore watches 2020-12-30 11:18:26 +01:00