git: devfs - replace subname* with related* functions
Alex Hornung
alexh at crater.dragonflybsd.org
Sat Jul 2 23:37:18 PDT 2011
commit 72ea429e305598e883aecb86f6c9a1ae5ce07b4d
Author: Alex Hornung <ahornung at gmail.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(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/72ea429e305598e883aecb86f6c9a1ae5ce07b4d
--
DragonFly BSD source repository
More information about the Commits
mailing list