>
> I am just supposing that a driver handling a clone open MIGHT decide to
> select a minor device that happens to be open already. LiS handles this
> case, but does not call the open routine for the {maj,min} stream so
> designated (it was called originally when it was first opened).
>
> A glance at Solaris source code suggests that they will just create a
> second stream head to the {maj,min}, which will probably lead to trouble later.
>
> So maybe LiS is unique in considering this to be a sensible case.
>
Perhaps. However if you are tracking the open/close state of cloning minor devices you might consider failing early at this point (ENXIO?) so the driver writer can find their error before this OS/streams/filesystem gets so messed up it panics several hours or days later.
LiS can keep it straight since it funnels both (or all) open streams files through a single stream head structure with appropriate open counts and reference counts. But unless LiS calls the driver open routine a second time it has no knowledge that this is happening and thus has no chance to reject the second open.
So maybe the answer is that LiS does need to call the open routine for the driver in this case so the driver can reject multiple opens if it chooses -- a sensible thing for a cloned device in my opinion.
-- Dave
_______________________________________________ Linux-streams mailing list [EMAIL PROTECTED] http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams
