Re: [RFC] How should delete_resource() handle children?

From: Matthew Wilcox
Date: Wed Feb 18 2004 - 21:23:36 EST


On Wed, Feb 18, 2004 at 05:48:00PM -0800, Randy.Dunlap wrote:
> Ideally (or if nothing depends on the current behavior), I think it
> should just be an error (return -EINVAL), not a BUG_ON(). I.e.,
> releasing a resource should be an explicit action.

-EBUSY, perhaps?

> Do we know of cases where parents are removed but children need to
> remain? Examples?

I don't know of any in-tree. I was originally just looking at this code
while writing adjust_resource() and insert_resource() and noticed this
corner case.

But now, I was thinking about using the resource management code to handle
the PCI hotplug resource management (which currently is done independently
by each hotplug driver). Since the drivers can be loaded independently
of everything under them, they'd need to use insert_resource() and
remove_resource() to avoid disturbing the child resources.

--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/