freebsd-skq/sys/geom
John Polstra a7e69e8b7d Fix a bug that caused some /dev entries to continue to exist after
the underlying drive had been hot-unplugged from the system.  Here
is a specific example.  Filesystem code had opened /dev/da1s1e.
Subsequently, the drive was hot-unplugged.  This (correctly) caused
all of the associated /dev/da1* entries to be deleted.  When the
filesystem later realized that the drive was gone it closed the
device, reducing the write-access counts to 0 on the geom providers
for da1s1e, da1s1, and da1.  This caused geom to re-taste the
providers, resulting in the devices being created again.  When the
drive was hot-plugged back in, it resulted in duplicate /dev entries
for da1s1e, da1s1, and da1.

This fix adds a new disk_gone() function which is called by CAM when a
drive goes away.  It orphans all of the providers associated with the
drive, setting an error condition of ENXIO in each one.  In addition,
we prevent a re-taste on last close for writing if an error condition
has been set in the provider.

Sponsored by:   Isilon Systems
Reviewed by:    phk
MFC after:      1 week
2005-11-18 02:43:49 +00:00
..
bde Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
concat Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
eli Fix copy&paste typo. 2005-09-10 07:46:47 +00:00
gate Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
label Add checking for File record magic. 2005-10-26 03:24:28 +00:00
mirror Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
nop g_nop_create: destroy newly created provider in case of errors. 2004-09-16 15:28:48 +00:00
raid3 Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
shsec Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
stripe Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
uzip Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
vinum Set the G_PF_WITHER flag on the subdisk provider that is about to 2005-09-08 20:08:46 +00:00
zero Add a very simple and small GEOM class - ZERO. 2005-07-25 10:03:16 +00:00
geom_aes.c stop including rijndael-api-fst.h from rijndael.h. 2005-03-11 15:42:51 +00:00
geom_apple.c
geom_bsd_enc.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 18:27:30 +00:00
geom_bsd.c Plug memory leak. 2005-03-16 20:48:13 +00:00
geom_ccd.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 18:27:30 +00:00
geom_ctl.c o Don't cause a panic when the control request lacks a verb. 2005-09-18 23:54:40 +00:00
geom_ctl.h
geom_dev.c Avoid null pointer dereference. 2005-03-18 06:57:58 +00:00
geom_disk.c Fix a bug that caused some /dev entries to continue to exist after 2005-11-18 02:43:49 +00:00
geom_disk.h Fix a bug that caused some /dev entries to continue to exist after 2005-11-18 02:43:49 +00:00
geom_dump.c Make the kern.geom.conftxt sysctl more usable by also dumping the 2005-11-12 20:02:02 +00:00
geom_event.c Remove a race condition that could result in processes being stuck 2005-09-04 19:14:19 +00:00
geom_fox.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 18:27:30 +00:00
geom_gpt.c o Slightly refactor the ctlreq code to maximize code sharing between 2005-11-13 21:53:55 +00:00
geom_int.h Use unit number allocation functions for GEOM minor numbers. 2004-10-25 12:28:28 +00:00
geom_io.c - Add a new simple facility for marking the current thread as being in a 2005-09-15 19:05:37 +00:00
geom_kern.c Call g_waitidle() instead of GEOM using the root_mount_hold() KPI. 2005-04-19 06:23:59 +00:00
geom_mbr_enc.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 18:27:30 +00:00
geom_mbr.c Implement a gctl handler and the verb "write MBR" which can be used to 2005-07-15 08:00:44 +00:00
geom_pc98_enc.c Fix signed vs unsigned warning. 2005-05-01 09:44:50 +00:00
geom_pc98.c Merged from geom_mbr.c revisions 1.62 and 1.66. 2005-07-15 15:29:45 +00:00
geom_slice.c Fix so that when a slice or a partition is removed through g_slice_config(), 2005-09-14 21:38:35 +00:00
geom_slice.h
geom_subr.c Fix a bug that caused some /dev entries to continue to exist after 2005-11-18 02:43:49 +00:00
geom_sunlabel_enc.c Support VTOC volume names. This can be useful to distinguish multiple 2005-03-30 09:33:10 +00:00
geom_sunlabel.c Protect against recursive labels creation in simlar way as it is done 2005-04-12 08:14:15 +00:00
geom_vfs.c Try to unbreak the vnode locking around vop_reclaim() (based mostly on 2005-02-19 11:44:57 +00:00
geom_vfs.h Make various random things static 2005-02-10 12:10:35 +00:00
geom_vol_ffs.c Take care not to issue unaligned I/O requests while tasting a provider. 2005-02-08 08:04:23 +00:00
geom.h Typo. 2005-09-03 11:03:10 +00:00
notes For removable devices without media we set a zero mediasize but a non-zero 2004-09-05 21:15:58 +00:00