From owner-freebsd-arch Mon Oct 8 1:22:34 2001 Delivered-To: freebsd-arch@freebsd.org Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by hub.freebsd.org (Postfix) with ESMTP id CA14037B401 for ; Mon, 8 Oct 2001 01:22:31 -0700 (PDT) Received: from [62.49.251.130] (helo=herring.nlsystems.com) by anchor-post-34.mail.demon.net with esmtp (Exim 2.12 #1) id 15qVgD-000Pjy-0Y; Mon, 8 Oct 2001 09:22:30 +0100 Received: from salmon.nlsystems.com (salmon [10.0.0.3]) by herring.nlsystems.com (8.11.2/8.11.2) with ESMTP id f988LE717041; Mon, 8 Oct 2001 09:21:14 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Mon, 8 Oct 2001 09:19:49 +0100 (BST) From: Doug Rabson To: Poul-Henning Kamp Cc: Peter Wemm , Brian Somers , Subject: Re: Cloned open support In-Reply-To: <95926.1002519791@critter.freebsd.dk> Message-ID: <20011008091835.X530-100000@salmon.nlsystems.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 8 Oct 2001, Poul-Henning Kamp wrote: > >Doug mentions the hack in dev/streams/streams.c: > > td->td_dupfd = fd; > > return ENXIO; > >.. this is nasty. :-) > > This is abuse, it should be rewritten. > > >I think the SVR4 clone driver uses something like this. It causes the > >original namei / open attempt to fail (thus releasing the "common" vnode) > >and then switching over to the *real* file/vnode at the last minute. > > We would have to do that as well in order to unwind the committed vnode > and select another. It might be abuse but its the only way that I know of to keep track of data per-open-file. -- Doug Rabson Mail: dfr@nlsystems.com Phone: +44 20 8348 6160 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message