freebsd-dev/sys/geom
Kenneth D. Merry 1ff824e786 Fix a bug that caused da(4) instances to hang around after the underlying
device is gone.

The problem was that when disk_gone() is called, if the GEOM disk
creation process has not yet happened, the withering process
couldn't start.

We didn't record any state in the GEOM disk code, and so the d_gone()
callback to the da(4) driver never happened.

The solution is to track the state of the creation process, and
initiate the withering process from g_disk_create() if the disk is
being created.

This change does add fields to struct disk, and so I have bumped
DISK_VERSION.

geom_disk.c:	Track where we are in the disk creation process,
		and check to see whether our underlying disk has
		gone away or not.

		In disk_gone(), set a new d_goneflag variable that
		g_disk_create() can check to see if it needs to
		clean up the disk instance.

geom_disk.h:    Add a mutex to struct disk (for internal use) disk
		init level, and a gone flag.

		Bump DISK_VERSION because the size of struct disk has
		changed and fields have been added at the beginning.

Sponsored by:	Spectra Logic
Approved by:	re (marius)
2016-06-21 20:18:19 +00:00
..
bde sys/geom: spelling fixes in comments. 2016-04-29 20:56:58 +00:00
cache
concat
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
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
stripe
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
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
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 Removal of Giant droping wrappers for GEOM classes. 2016-05-20 08:25:37 +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