DragonFly commits List (threaded) for 2011-07
git: devfs - replace subname* with related* functions
Author: Alex Hornung <email@example.com>
Date: Sun Jul 3 01:16:43 2011 +0100
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.
Summary of changes:
sys/kern/subr_disk.c | 18 +++++----
sys/sys/conf.h | 1 +
sys/sys/devfs.h | 14 ++++----
sys/vfs/devfs/devfs_core.c | 79 ++++++++++++++++++++++++-------------------
4 files changed, 62 insertions(+), 50 deletions(-)
DragonFly BSD source repository