On Sun, 17 Nov 2002, Alexander Viro wrote:
> There is a purpose? Seriously, "no use of ones object during init" is
> WRONG. Rusty, remember I've told you that block devices need to be
> able to open() during init? That's what it is.
>
> We _might_ eventually kludge around that, but IMO the ->live checks on
> the init side are just plain wrong.
PS: logics in case of block devices is very simple: by the time when you
can handle open and IO on a disk, you are already set up - no point
bailing out after that point; if other disks served by the same driver
do not work, it means that they should be left out, not that driver
should fail init. IOW, logics of init, regardless of modular/nonmodular
makes that a point where you are past failure exits.
And I'd rather see similar rules for other interfaces. Yes, it might
require API changes - e.g. old block API was badly b0rken in that respect
since register_blkdev() allowed open() attempts, no matter whether you are
ready or not, so block drivers used to be seriously racy in that area.
Right way is "don't export an object until you are ready to serve it" and
once your API is of that sort, you are pretty much done. Note that non-modular
case _also_ need that sort of logics, simply because we might get userland
up and running before the initcalls are done.
-
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/
This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:19 EST