Re: [RFC] /sbin/hotplug multiplexor

Greg KH (greg@kroah.com)
Mon, 14 Apr 2003 15:21:21 -0700


On Tue, Apr 15, 2003 at 12:04:04AM +0200, Arnd Bergmann wrote:
> Oliver Neukum wrote:
>
> > Well, for a little elegance you might introduce subdirectories for each type
> > of hotplug event and use only them.
>
> I was just about to propose the same. Please use subdirs or namespaced files
> like in:
>
> for I in "${DIR}/$1".* "${DIR}/"default.* ; do
> test -x $I && $I $1
> done

Hm, default looks good, but why would it have a .*? How about:

for I in "${DIR}/$1/"* "${DIR}/"default/* ; do

That way the programs that really care about only one subsystem can be
easily added, while everyone else can drop into the default directory
(which odds are, everyone will want to be in...)

Sound ok?

> Note that a single event can not only cause one hotplug event for many devices
> but also _multiple_ events for every device. E.g. enabling a dasd devices
> will cause hotplug to be called for the local subchannel devices as well as
> the actual (remote) disk. Maybe someone adds hotplug calls for partitions
> and logical volumes.
> Since dasds are usually not larger than 2GB, you are quite likely
> to enable many at the same time. Imagine you get 500 disks * 4 events * 10
> agents in response to a single user command...

Damm, you s390 people, always showing everyone else up :)

Ok, I'll take the '&' out for now, and serialize things within a single
hotplug call.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/