[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
devd limitations / automounting removable storage
- Subject: devd limitations / automounting removable storage
- From: imp at bsdimp.com (M. Warner Losh)
- Date: Wed Sep 17 22:55:01 2003
In message: <Pine_(_dot_)_NEB_(_dot_)_3_(_dot_)_96L_(_dot_)_1030917161519_(_dot_)_51283B-100000_(_at_)_fledge_(_dot_)_watson_(_dot_)_org>
Robert Watson <rwatson_(_at_)_freebsd_(_dot_)_org> writes:
: We might skip the devfs layer since it's probably implicit in the
: completion of ifnet_attach() and disk_create(), but it's worth thinking
The thing about implicit stuff is that it move knowledge about what is
created in the driver into userland. This isn't necessarily a good
thing. For most of the examples talked about, this isn't an issue,
but what about stranger hardware that creates many devices?
: This would allow ifconfig commands to be issued once the network
: device is available, rather than once newbus has attached an xl0.
network interfaces are available for all drivers in the tree after
attach finishes. However, interfaces that aren't an exact mirror of
the hardware don't show up. tun0, for example.
Also, network interfaces are in a different namespace than newbus
: Or for
: geom to announce ad0s1e even though newbus doesn't know about it.
Be careful here. You are confusing two different name spaces. dev_t
is a third namespace in the kernel. sysctl is another one and of
course file systems.
You'd want to know that devfs events have happened in this case. GEOM
likely doesn't need to get into the mix. And you can likely do that
with a kqueue on the /dev directory.
GEOM lives in the dev_t name space (right?)
: Or for
: devd to handle the introduction of synthetic interfaces such as vlan, tun,
: etc, which aren't visible to newbus. Or for the device driver names and
: interface names to differ (or for a non-one-one mapping, interface
: renames, etc).
Yes. devd started out life as a device_t only thing. However, it is
better viewed as more generalized event dispatcher that currently only
understand events from device_t entities.
I was going to point out that there's not a connection between the
device_t name and the dev_t name, except by convention. Even when
there is a connection, it can be weird. Device foo0 might create
/dev/foo0_error and /dev/foo0_data, or other such perverse things.
Visit your host, monkey.org