Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jun 1998 14:44:23 -0700 (PDT)
From:      Julian Elischer <julian@whistle.com>
To:        Brian Somers <brian@Awfulhak.org>
Cc:        current@FreeBSD.ORG
Subject:   Re: RFC: Change to the device interface 
Message-ID:  <Pine.BSF.3.95.980614143541.6528A-100000@current1.whistle.com>
In-Reply-To: <199806142130.WAA27843@awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On Sun, 14 Jun 1998, Brian Somers wrote:

> > As PHK and others have noted the device interface is broken in a number of
> > ways: 
> > 
> > Here is a set of suggestions for fixing it
> > (hopefully in a way that will be minimal impact.)
> > The message was originally on another topic..
> [.....]
> > A second change would be to make each FILE structure in the kernel
> > store a cookie that is returned by the open() call to the driver.
> > this would allow the driver to associate an IO request with a particular
> > open(). it would be an added arguent to all the devsw[] entrypoints.
> [.....]
> 
> I vote for this option.  It's the intuitive place to hold state 
> information, despite it not being required by every driver.
> 

I wasn't suggesting that one be done without the other, but rather
splitting up the work into 2 'phases'. They are somewhat order
independent.

the first 'phase' can be done without editing any drivers, but becomes a
lot more useful with the addition of the second change.


reminder
phase 1.. add devsw[]  entrypoint for all status changes (RDONLY->RDWR
close etc)
phase 2.. associate every IO request with an 'open' using a cookie.

this way a driver can know who is asking for an IO and how many
clients it actuually has (which it doesn't know at the moment.)
(at the moment it knows 0 or "more than 0")
Justin in particular is asking for that ability for CAM.

julian



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.980614143541.6528A-100000>