Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Aug 2003 11:01:47 +0200
From:      Pawel Jakub Dawidek <nick@garage.freebsd.pl>
To:        Peter Jeremy <PeterJeremy@optushome.com.au>
Cc:        Buckie <freebsd1@centrum.cz>
Subject:   Re: GEOM Gate.
Message-ID:  <20030815090146.GM395@garage.freebsd.pl>
In-Reply-To: <20030815084414.GA71116@cirb503493.alcatel.com.au>
References:  <20030814110327.GD395@garage.freebsd.pl> <901731042.20030814215225@centrum.cz> <20030814202909.GK395@garage.freebsd.pl> <20030815084414.GA71116@cirb503493.alcatel.com.au>

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

--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
	<list of devices that was exported on 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030815090146.GM395>