From owner-freebsd-hackers Thu Aug 10 16:15: 8 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from Awfulhak.org (tun.AwfulHak.org [194.242.139.173]) by hub.freebsd.org (Postfix) with ESMTP id 535C537BB31; Thu, 10 Aug 2000 16:14:57 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.awfulhak.org [172.16.0.12]) by Awfulhak.org (8.9.3/8.9.3) with ESMTP id AAA44891; Fri, 11 Aug 2000 00:10:41 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id AAA28283; Fri, 11 Aug 2000 00:10:38 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200008102310.AAA28283@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: Robert Watson Cc: Isaac Waldron , freebsd-hackers@FreeBSD.org, freebsd-arch@FreeBSD.org, brian@Awfulhak.org Subject: Re: Writing device drivers (ioctl issue) In-Reply-To: Message from Robert Watson of "Thu, 27 Jul 2000 16:13:08 EDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 11 Aug 2000 00:10:38 +0100 From: Brian Somers Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I ran into this same problem when modifying the vmmon VMWare driver for > FreeBSD to support mulitple emulator instances. FreeBSD's VFS does not > have a concept of stateful file access: there are open's and close's, but > the VOP_READ/WRITE operations are not associated with sessions. This [.....] > There are a number of possible solutions to this problem, including the [.....] > My preferred solution, and I actually hacked around with a kernel a bit to > do this, is to make the VFS provide (optional) stateful vnode sessions. > vop_open() would gain an additional call-by-reference argument, probably a > void**. When NULL, the caller would be requesting a stateless vnode open, [.....] > My changes are incomplete as I was working on it on the plane, and > comments on the idea would be welcome. One thing this would allow is for [.....] I think this is something that BSD lacks big-time. It simplifies the way userland opens devices and should be fairly easy to implement. If you haven't got time, I'd be willing to pick this up. Do you have anything worth sending me (patches) ? Cheers. > Robert N M Watson > > robert@fledge.watson.org http://www.watson.org/~robert/ > PGP key fingerprint: AF B5 5F FF A6 4A 79 37 ED 5F 55 E9 58 04 6A B1 > TIS Labs at Network Associates, Safeport Network Services -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message