Subject: Re: Device Properties: The Next Generation
To: None <email@example.com>
From: Chris G. Demetriou <firstname.lastname@example.org>
Date: 02/19/2001 12:20:11
> I still don't get it. Could you give an example where limiting
> a property to `x' levels below this node would be useful?
So, I think we're looking at this from different angles.
I can construct some where you _need_ that behaviour, but they seem
However, it seems obvious to me that an inherently useful feature of a
good properties interface would be _not_ exposing data where it
shouldn't be known.
Certain cases, e.g. the power management one, seem to call for
properties to be inherited by any children.
However, in other cases that behaviour seems completely bogus:
e.g. why _should_ a SCSI disk be able to inherit e.g. PCI chipset info
from the PCI controller N levels above it, or even the PCI device
number of the controller it's hanging off of M levels above?
Attempts at such uses are erroneous, even if an explicit attempt to
inherit the property is made. Why? Because the SCSI disk shouldn't
care, and can't really know what it's attached to N levels up. All it
knows is the defined interface between it and its parent.
Attempts to get at such data are violations of the interface the SCSI
disk should be attempting to use. If it has some type of special
knowledge, e.g. by grovelling around device structures and looking
explicitly at its parent, it can find out more. But, barring that, it
shouldn't be able to just fall on additional data.
A good properties interface will make it straightforward to find and
diagnose such simple violations. In a nutshell, to my mind, that
means at least being able to specify the extent to which the data
should be propagated. (That way, if somebody looks, and they can't
find it, they get an error at least, rather than getting data that
they shouldn't know what to do with.)
The 'limit inheritance to N levels' seemed a method of doing that
which is simple in both concept and implementation.
Really, this kind of interface needs _some_ method of limiting the
propagation of inherited properties. I've brought up several; that
one seems the simplest.