freebsd-nq/sys/geom
Pawel Jakub Dawidek 3ea5d7ec24 When orphaning a provider, cancel events related to it.
Without this change the following situation was possible:

1. Provider is orphaned from within class' access() method on last write
   close - orphan provider event is send.
2. GEOM detects last write close on a provider and sends new provider event.
3. g_orphan_register() is called, and calls all orphan methods of attached
   consumers.
4. New provider event is executed on orphaned provider, all classes can
   taste already orphaned provider, and some may attach consumers to it.
   Those consumers will never go away, because the g_orphan_register()
   was already called.

We end up with a zombie provider.

With this change, at step 3, we will cancel new provider event.

How to repeat this problem:

	# mdconfig -a -t malloc -s 10m
	# geli init -i 0 md0
	# geli attach md0
	# newfs -L test /dev/md0.eli
	# mount /dev/ufs/test /mnt/tmp
	# geli detach -l md0.eli
	# umount /mnt/tmp
	# glabel status
            Name  Status  Components
        ufs/test  N/A     N/A

Reviewed by:	phk
Approved by:	re (kensmith)
2007-09-27 20:18:34 +00:00
..
bde Commit the results of the typo hunt by Darren Pilgrim. 2006-08-04 07:56:35 +00:00
cache Despite several examples in the kernel, the third argument of 2007-06-04 18:25:08 +00:00
concat Implement BIO_FLUSH handling by simply passing it down to the components. 2006-10-31 21:23:51 +00:00
eli Add support for Camellia encryption algorithm. 2007-09-01 06:33:02 +00:00
gate Bump copyright year. 2006-09-08 10:20:44 +00:00
journal Commit 14/14 of sched_lock decomposition. 2007-06-05 00:00:57 +00:00
label Remove trailing spaces. 2006-09-30 08:16:49 +00:00
mirror Commit 14/14 of sched_lock decomposition. 2007-06-05 00:00:57 +00:00
multipath First cut at GEOM based multipath. This is an active/passive{/passive...} 2007-02-27 04:01:58 +00:00
nop Remove trailing spaces. 2006-09-30 08:16:49 +00:00
part Have gpart synthesize a disk geometry if the underlying provider 2007-06-17 22:19:19 +00:00
raid3 Commit 14/14 of sched_lock decomposition. 2007-06-05 00:00:57 +00:00
shsec Add BIO_FLUSH support to GSHSEC class. 2006-11-01 12:30:51 +00:00
stripe Despite several examples in the kernel, the third argument of 2007-06-04 18:25:08 +00:00
uzip If compressed length is zero, return a zero-filled block. 2007-04-24 06:30:06 +00:00
vinum -) Correct sdcount for a plex when removing or adding subdisks. 2007-04-12 17:54:35 +00:00
virstor LINT compiled just fine for me, but it seems it breaks tinerbox way of 2007-09-23 15:10:48 +00:00
zero Remove trailing spaces. 2006-02-01 12:06:01 +00:00
geom_aes.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom_bsd_enc.c
geom_bsd.c Remove the trailing half of a sentence which was clearly superceded 2006-05-24 11:02:32 +00:00
geom_ccd.c Make CCD be able to read and write Linux software raids. 2006-04-13 20:35:31 +00:00
geom_ctl.c - Be more verbose when saying "foo" not found. 2007-03-30 16:32:08 +00:00
geom_ctl.h
geom_dev.c Implement three new ioctls that can be used with GEOM provider: 2007-05-05 17:02:19 +00:00
geom_disk.c Allow to use ':' in d_ident, which is quite handy character. 2007-05-05 18:09:17 +00:00
geom_disk.h - Extend disk structure to allow to store disk's serial number, which can be 2007-05-05 17:12:15 +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 When orphaning a provider, cancel events related to it. 2007-09-27 20:18:34 +00:00
geom_fox.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom_int.h
geom_io.c Implement g_delete_data() similar to g_read_data() and g_write_data(). 2007-05-05 16:35:22 +00:00
geom_kern.c Commit 14/14 of sched_lock decomposition. 2007-06-05 00:00:57 +00:00
geom_mbr_enc.c
geom_mbr.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom_pc98_enc.c
geom_pc98.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom_slice.c Handle GEOM::ident attribute by attaching 'sX' string at the end of ident 2007-05-05 17:52:22 +00:00
geom_slice.h Allow to use g_slice_orphan() from outside. 2006-02-18 11:21:17 +00:00
geom_subr.c - Implement helper g_handleattr_str() function for string attributes 2007-05-05 16:33:44 +00:00
geom_sunlabel_enc.c
geom_sunlabel.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom_vfs.c Cylinder group bitmaps and blocks containing inode for a snapshot 2007-01-23 10:01:19 +00:00
geom_vfs.h
geom_vol_ffs.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom.h Implement g_delete_data() similar to g_read_data() and g_write_data(). 2007-05-05 16:35:22 +00:00
notes