devfs - replace subname* with related* functions
authorAlex Hornung <ahornung@gmail.com>
Sun, 3 Jul 2011 00:16:43 +0000 (01:16 +0100)
committerAlex Hornung <ahornung@gmail.com>
Sun, 3 Jul 2011 06:36:00 +0000 (07:36 +0100)
commit72ea429e305598e883aecb86f6c9a1ae5ce07b4d
tree745aaff57cb72110c2a96f1ed8fee936f8ab6ab0
parentb0068c38378e6572a5478db8b81c7c8d5fcd770c
devfs - replace subname* with related* functions

 * Completely remove the subname* cruft that removed devices based on
   whether they started with a given string. This was used to remove,
   for example, all slices and partitions whenever a disk was removed.
   The issue with it was that it was solely based on name, so if one
   created for example two (unrelated) dm volumes, called "foo1" and
   "foo1234", then removing "foo1" would leave "foo1234" dangling.

 * Instead we introduce the concept of devices (cdevs) having parents:
   now the slices have the disk as their parent, and the partitions have
   the slice as their parents. The related* functions in devfs
   recursively deal with these relationships given a parent node.

 * This fix will be MFC'ed in a week or two if no issues pop up.
sys/kern/subr_disk.c
sys/sys/conf.h
sys/sys/devfs.h
sys/vfs/devfs/devfs_core.c