freebsd-skq/sys/geom
Kenneth D. Merry e5616d65d0 Fix a bug that caused da(4) peripheral drivers to not fully go away
after the underlying device went away.

The problem was that callers who queue the GEOM resize provider
event didn't check to make sure that the provider had not been
withered.  For the other equivalent case, g_new_provider_event(),
the code checks to see whether the provider has been withered
before queueing a g_new_provider_event() to the event thread.

In some cases, a resize provider event would come through after
the provider had been withered and all of the existing consumers
had been orphaned.  When the resize event triggered a taste of
the provider, that would attach a new consumer to the now
withered provider.  The wither washer (g_wither_washer() would
never be able to completely tear down the GEOM because of the
consumers that were hanging around.

The solution was to check the G_PF_WITHER provider flag before
queueing the g_resize_provider_event(), and add an assert to
g_resize_provider_event() to insure that it isn't called on a
withered provider.

sys/geom/geom_subr.c:
	In g_resize_provider(), don't try to continue if the
	G_PF_WITHER flag is set.

	In g_resize_provider_event(), add an assert that the
	G_PF_WITHER flag is not set.

	In g_access(), if a provider has an error, print out the
	name of the provider with the error.

Sponsored by:	Spectra Logic
Approved by:	re (marius)
MFC after:	3 days
2016-06-22 14:39:13 +00:00
..
bde sys/geom: spelling fixes in comments. 2016-04-29 20:56:58 +00:00
cache Unsigned values can never be less than 0. 2014-08-07 21:56:37 +00:00
concat Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
eli Removal of Giant droping wrappers for GEOM classes. 2016-05-20 08:25:37 +00:00
gate g_gate: for pointers replace 0 with NULL. 2016-04-15 16:18:07 +00:00
journal Removal of Giant droping wrappers for GEOM classes. 2016-05-20 08:25:37 +00:00
label Fix off-by-one error in fstyp(8) and geom_label(4) that made them use 2015-06-18 21:55:55 +00:00
linux_lvm Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
mirror When we are in panic, always go the asynchronous path in g_mirror_destroy(), 2016-06-01 22:11:54 +00:00
mountver Removal of Giant droping wrappers for GEOM classes. 2016-05-20 08:25:37 +00:00
multipath Prevent g_access calls to bad multipath members 2015-12-15 21:11:41 +00:00
nop Make geom_nop(4) collect statistics on all types of BIOs, not just 2015-10-10 09:03:31 +00:00
part sys/geom: spelling fixes in comments. 2016-04-29 20:56:58 +00:00
raid Removal of Giant droping wrappers for GEOM classes. 2016-05-20 08:25:37 +00:00
raid3 Removal of Giant droping wrappers for GEOM classes. 2016-05-20 08:25:37 +00:00
sched Cleanup unnecessary semicolons from the kernel. 2016-04-10 23:07:00 +00:00
shsec Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
stripe Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
uzip Add missing include "opt_geom.h" to make GEOM_UZIP_DEBUG option working, 2016-05-06 20:32:39 +00:00
vinum sys/geom: spelling fixes in comments. 2016-04-29 20:56:58 +00:00
virstor sys: Make use of our rounddown() macro when sys/param.h is available. 2016-04-30 14:41:18 +00:00
zero
geom_aes.c
geom_bsd_enc.c sys/geom: spelling fixes in comments. 2016-04-29 20:56:58 +00:00
geom_bsd.c Remove old ioctl use and support, once and for all. 2015-01-06 05:28:37 +00:00
geom_ccd.c sys/geom: spelling fixes in comments. 2016-04-29 20:56:58 +00:00
geom_ctl.c geom: unsign some types to match their definitions and avoid overflows. 2016-04-27 15:10:40 +00:00
geom_ctl.h
geom_dev.c Avoid issuing spa config updates for physical path when not necessary 2016-05-27 22:32:44 +00:00
geom_disk.c Fix a bug that caused da(4) instances to hang around after the underlying 2016-06-21 20:18:19 +00:00
geom_disk.h Fix a bug that caused da(4) instances to hang around after the underlying 2016-06-21 20:18:19 +00:00
geom_dump.c Report withered providers as such alike to GEOMs. 2015-03-26 11:19:24 +00:00
geom_event.c Remove asserts that Giant is not held on entrance into geom KPI, which 2016-05-20 08:22:20 +00:00
geom_flashmap.c Teach the flashmap code about the SPI flash. 2016-01-23 05:26:29 +00:00
geom_fox.c
geom_int.h
geom_io.c Add support for managing Shingled Magnetic Recording (SMR) drives. 2016-05-19 14:08:36 +00:00
geom_kern.c Remove unneeded Giant locking around kthreads creation. 2016-05-20 08:28:11 +00:00
geom_map.c Fix incorrect error message in geom map 2015-12-27 17:09:23 +00:00
geom_mbr_enc.c sys/geom: spelling fixes in comments. 2016-04-29 20:56:58 +00:00
geom_mbr.c Removal of Giant droping wrappers for GEOM classes. 2016-05-20 08:25:37 +00:00
geom_pc98_enc.c
geom_pc98.c Removal of Giant droping wrappers for GEOM classes. 2016-05-20 08:25:37 +00:00
geom_redboot.c
geom_slice.c
geom_slice.h
geom_subr.c Fix a bug that caused da(4) peripheral drivers to not fully go away 2016-06-22 14:39:13 +00:00
geom_sunlabel_enc.c sys/geom: spelling fixes in comments. 2016-04-29 20:56:58 +00:00
geom_sunlabel.c
geom_vfs.c
geom_vfs.h
geom_vol_ffs.c
geom.h Remove asserts that Giant is not held on entrance into geom KPI, which 2016-05-20 08:22:20 +00:00
notes