From owner-freebsd-hackers Sat Dec 8 20:38:54 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id 21D6137B405; Sat, 8 Dec 2001 20:38:51 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id C397C81E0E; Sat, 8 Dec 2001 22:38:50 -0600 (CST) Date: Sat, 8 Dec 2001 22:38:50 -0600 From: Alfred Perlstein To: Robert Watson Cc: Poul-Henning Kamp , Dave Rufino , Terry Lambert , freebsd-hackers@FreeBSD.ORG Subject: Re: statefulness in character device drivers Message-ID: <20011208223850.N92148@elvis.mu.org> References: <20011208054108.C92148@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from rwatson@FreeBSD.ORG on Sat, Dec 08, 2001 at 08:43:01PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Robert Watson [011208 19:43] wrote: > > On Sat, 8 Dec 2001, Alfred Perlstein wrote: > > > Yes, but afaik without a way to differenciate between two opens. Being > > able to notice whether a file is being operated on via which open is the > > important part. > > > > This would probably involve changing VOP_OPENs to pass a void ** that > > would be stored in the struct file that would be passed to subsequent > > ioctl/read/write/close operations. > > I had some patches to do this, but lost them ages ago. If I get really > bored next week, I'll redo them and stick them in a perforce branch. That > said, it requires a bit more work, but is easier if you define the void** > as optional: if it's non-NULL, then you return state, and let it get > passed back in. Otherwise, you assume it's traditional stateless access. > It requires some tweaking of the vnode pager, among other things, but is > actually a relatively straight-forward patch. Maybe I'll give it a spin > again and post patches to -arch or something. I'd be glad to assist in any way possible to get this integrated, we've really been wanting this for various reasons (mostly linnex compat) let me know if you're too busy and I can try to take over from your existing work. Point being, I want this done ASAP. :) -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' http://www.morons.org/rants/gpl-harmful.php3 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message