From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 15 02:01:38 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 33C0437B405 for ; Fri, 15 Aug 2003 02:01:38 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F9A443F3F for ; Fri, 15 Aug 2003 02:01:37 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 20EDB3ABB3F; Fri, 15 Aug 2003 11:01:47 +0200 (CEST) Date: Fri, 15 Aug 2003 11:01:47 +0200 From: Pawel Jakub Dawidek To: Peter Jeremy Message-ID: <20030815090146.GM395@garage.freebsd.pl> References: <20030814110327.GD395@garage.freebsd.pl> <901731042.20030814215225@centrum.cz> <20030814202909.GK395@garage.freebsd.pl> <20030815084414.GA71116@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="NOl3kBTBh+CNLogO" Content-Disposition: inline In-Reply-To: <20030815084414.GA71116@cirb503493.alcatel.com.au> X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.8-RELEASE-p3 i386 X-URL: http://garage.freebsd.pl User-Agent: Mutt/1.5.1i cc: freebsd-hackers@freebsd.org cc: Buckie Subject: Re: GEOM Gate. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2003 09:01:39 -0000 --NOl3kBTBh+CNLogO Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 15, 2003 at 06:44:14PM +1000, Peter Jeremy wrote: +> >But there are two problems: +> >1. Device major numbers. +>=20 +> I don't see this as a problem - you do the name to major/minor mapping +> on the remote system. All that goes across the network is the device +> name (filename in /dev). This is the same way that NFS works. The +> device major number is just an easy way for the kernel to map a device +> name onto the device-specific functions to access the physical +> hardware - this only needs to occur on the server. Hmm, I was thinking about something like this: # devaccess 192.168.0.2 host1 # ls -l /dev/host1 And 'devaccess' command will call some kernel mechanism to create new devices, but all those devices are defined in this way: [...] .d_open =3D std_open, .d_close =3D std_close, .d_ioctl =3D std_ioctl, .d_maj =3D ?? [...] And std_open()/std_close()/std_ioctl() are functions that only pass requests to userland daemon, which forwards them to remote host and back. +> >2. Handle network errors. +>=20 +> I think the easiest way is just to pass them back to the application. +> This does mean that an application would get unexpected network-related +> errors, but there's no obvious alternative. Or translate all of them to EIO. --=20 Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net --NOl3kBTBh+CNLogO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPzyhej/PhmMH/Mf1AQGx8AP+NWI2yvl/T57Rgnpcg5oCAgBBigMWc8cv 2/i7L8vOiJUIMIX1BHMm+1OGjrvzdgdjKnkuf0ag35QLWIZG0zkaZxBR6LmQIoXM dhve/uVjxAuAteigDiZgHwZaXNdSxikvrxcsW9Pfwb3xg2PW0DL0UZPNCI8htRSO 5vMqC48qbhA= =bL/o -----END PGP SIGNATURE----- --NOl3kBTBh+CNLogO--