freebsd-dev/sys/geom/mirror
Ryan Libby 9167705c8c g_mirror_taste: avoid deadlock, always clear tasting flag
If g_mirror_taste encountered an error at g_mirror_add_disk, it might
try to g_mirror_destroy the device with the G_MIRROR_DEVICE_FLAG_TASTING
flag still set.  This would wait on a worker to complete the destruction
with g_mirror_try_destroy, but that function bails out if the tasting
flag is set, resulting in a deadlock.  Clear the tasting flag before
trying to destroy the device.

Test Plan:
sysctl debug.fail_point.mnowait="1%return"
kyua test -k /usr/tests/sys/geom/class/mirror/Kyuafile

Reviewed by:	markj
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D20744
2019-07-01 22:06:36 +00:00
..
g_mirror_ctl.c Sort and remove unneeded includes. 2018-01-08 15:56:40 +00:00
g_mirror.c g_mirror_taste: avoid deadlock, always clear tasting flag 2019-07-01 22:06:36 +00:00
g_mirror.h gmirror: Relocate DEVICE_FLAGS to adjacent lines 2019-01-23 16:44:21 +00:00