Raw device support v0.3, 26 March 1999

This is the first major rewrite of the raw IO support for Linux-2.2.
The patches enclosed are for the 2.2.4 kernel.  If you don't know how to
apply a kernel patch, you probably shouldn't be using this test release!

The raw devices implemented in this release are genuine Un*x-compatible
character-mode raw devices.  However, unlike most Unixen, the Linux raw
devices are not hard-coded in advance against specific block devices.
Rather, there is a new character major number (currently 111) which
implements a series of unbound raw devices, and it is up to the system
administrator to make sure that these are bound to the appropriate block
devices at runtime.  This means that _any_ block device can have a
character raw device front-end, even if the block device is only loaded
later on at runtime.

The Makefile in this directory will generate a user front-end program
called "raw".  It is used as follows:


You can query the binding of an existing raw device with

	raw -l /dev/rawN

or 

	raw -a

to query them all.  To bind a raw device to an existing block device,
use either

	raw /dev/rawN <major> <minor>

giving the block-device major and minor numbers directly, or

	raw /dev/rawN /dev/<blockdev>

to bind to an existing device in /dev.  Note that the permissions on the
raw device are entirely separate from the block device, and you must set
the mode and ownership of the raw device appropriately.

There are 255 raw devices available for binding, plus a master raw
device (with minor number 0) which is used to control the bindings on
the others.  You can set up a few raw devices to start with via mknod:

	mknod /dev/raw c 111 0
	chmod 600 /dev/raw	# This is important!

	mknod /dev/raw1 c 111 1
	mknod /dev/raw2 c 111 2
	mknod /dev/raw3 c 111 3
	mknod /dev/raw4 c 111 4

and bind them to whatever block devices you want to use:

	raw /dev/raw1 /dev/sda3
	raw /dev/raw2 /dev/fd0

or whatever.  Let me know how it works for you!


--Stehen Tweedie <sct@redhat.com>
