freebsd-dev/sys/cam/scsi
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
..
scsi_all.c The divide by zero panic must have been due to a bogus 2005-04-14 03:52:50 +00:00
scsi_all.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
scsi_cd.c Fix a bug that caused some /dev entries to continue to exist after 2005-11-18 02:43:49 +00:00
scsi_cd.h
scsi_ch.c Fix a place where we were referencing a pointer after it had been freed. 2005-03-26 04:21:11 +00:00
scsi_ch.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
scsi_da.c Fix a bug that caused some /dev entries to continue to exist after 2005-11-18 02:43:49 +00:00
scsi_da.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
scsi_dvcfg.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
scsi_iu.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
scsi_low_pisa.c Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
scsi_low_pisa.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
scsi_low.c - Providing fine-grained malloc statistic by replacing M_DEVBUF with 2005-07-01 15:21:30 +00:00
scsi_low.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
scsi_message.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
scsi_pass.c Don't pass unadulterated unit numbers to make_dev and its ilk- if you 2005-01-22 07:21:25 +00:00
scsi_pass.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
scsi_pt.c Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
scsi_pt.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
scsi_sa.c - Providing fine-grained malloc statistic by replacing M_DEVBUF with 2005-07-01 15:21:30 +00:00
scsi_sa.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
scsi_ses.c - Providing fine-grained malloc statistic by replacing M_DEVBUF with 2005-07-01 15:21:30 +00:00
scsi_ses.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
scsi_targ_bh.c - Providing fine-grained malloc statistic by replacing M_DEVBUF with 2005-07-01 15:21:30 +00:00
scsi_target.c Merge the dev_clone and dev_clone_cred event handlers into a single 2005-08-08 19:55:32 +00:00
scsi_targetio.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00