[LWN Logo]

Date:	Tue, 1 Sep 1998 16:19:32 +0200 (MET DST)
From:	MOLNAR Ingo <mingo@valerie.inf.elte.hu>
To:	linux-raid@vger.rutgers.edu
Subject: RELEASE: RAID-0,1,4,5 version 0.51, kernel 2.1.120


this is an alpha release of the latest Linux RAID0145 drivers, against
kernel 2.1.120.

WARNING: this patch and the new raidtools contains various downwards
incompatible changes. You might not be able to run arrays created with
this release under older kernels. (older arrays will run upwards
compatible with nonfatal warnings printed by the kernel)

you can find raid0145-980901-2.1.120.gz and raidtools-0.51beta1.tar.gz in
the usual alpha directory:

	http://linux.kernel.org/pub/linux/daemons/raid/alpha


an overview of new features in this release:

 = fully kernel based RAID configuration, 'zero-time mkraid'

    there is a new API between user-space and the kernel space RAID
    drivers, which has the following structure:

	/* status */
	#define RAID_VERSION            _IO (MD_MAJOR, 0x10)
	#define GET_ARRAY_INFO          _IO (MD_MAJOR, 0x11)
	#define GET_DISK_INFO           _IO (MD_MAJOR, 0x12)

	/* configuration */
	#define CLEAR_ARRAY             _IO (MD_MAJOR, 0x20)
	#define ADD_NEW_DISK            _IO (MD_MAJOR, 0x21)
	#define REMOVE_DISK             _IO (MD_MAJOR, 0x22)
	#define SET_ARRAY_INFO          _IO (MD_MAJOR, 0x23)
	#define SET_DISK_INFO           _IO (MD_MAJOR, 0x24)
	#define WRITE_RAID_INFO         _IO (MD_MAJOR, 0x25)
	#define UNPROTECT_ARRAY         _IO (MD_MAJOR, 0x26)
	#define PROTECT_ARRAY           _IO (MD_MAJOR, 0x27)

	/* usage */
	#define RUN_ARRAY               _IO (MD_MAJOR, 0x30)
	#define START_ARRAY             _IO (MD_MAJOR, 0x31)
	#define STOP_ARRAY              _IO (MD_MAJOR, 0x32)
	#define STOP_ARRAY_RO           _IO (MD_MAJOR, 0x33)

    everything RAID related is supposed to be done through this API.
    raidtools no more touches the raw devices. In fact, raidtools has
    shrinked to two commands currently:

	mkraid /dev/md0
	raidstart /dev/md0
	
    mkraid creates and starts the array, raidstart starts an already
    created array. Probably ckraid will stay to help more complex error
    scenarios, but it's 'everyday usage' is completely eliminated. It will
    probably be a debugging tool in the future, than a real utility.

    mkraid no more has to clear the array, thus the creation of RAID
    arrays got much faster.

 = 'nonpersistent' superblocks support

    a new keyword has been added to /etc/raidtab:

           persistent-superblock     0

    the above line means that the array has to be mkraid-ed before every
    usage, but it's superblock will not be allocated at the end of the
    device.

    this feature enables:

       - to create a RAID1 array after the filesystem has been created.
         (with the disadvantage of not having a superblock)

       - legacy (superblock-less) RAID0 support

 = RAID0 and linear can now have a superblock too

   the default for RAID0 is no persistent superblock, but it can be
   enabled by adding:

           persistent-superblock     0

   such RAID0 arrays will behave just like normal RAID1 and RAID5 arrays,
   they can be autorun at boot, they can be raidstart-ed with one command,
   etc.

 = runtime detection and benchmarking of checksumming functions

   the RAID5 driver detects and measures various checksumming functions,
   and picks the fastest one automatically at bootup:

	raid0 personality registered
	raid1 personality registered
	raid5 personality registered
	raid5: measuring checksumming speed
	raid5: using high-speed MMX checksum routine
	   pII_mmx   :   875.919 MB/sec
	   p5_mmx    :   842.391 MB/sec
	   8regs     :   598.551 MB/sec
	   32regs    :   360.045 MB/sec
	using fastest function: pII_mmx (875.919 MB/sec)

   the whole checksumming code has been integrated into xor.c (all
   platform specific functions), because we no more have one
   assembly-optimized function, but possibly many. Development is easier
   this way too. Feel free to send better or new functions to this list
   that work better on certain CPUs. It does not have to be a generic
   function, if it's faster only on one CPU revision, i will add it
   to the sources because it gets picked up automatically.

 = superblock integrity checksums

    superblock updates are atomic starting from this release, ie. if a
    superblock gets corrupted due to partial writes, it will not be used.
    (unless all superblocks are corrupted)

 = automatic raidstop on reboot

    well, now we do a raidstop on reboot [idea by Carlos Carvalho]

 = 'raidstart' from user-space

   autodetection can be done from user-space too, the kernel will just
   pick the right devices and start the array.


 = extensive rewrite

   basically all the main MD code got rewritten, all RAID include files
   are collected in include/linux/raid. I have tested most usages and
   things do work for me, but there might be some glitches left.

 = many usability bugs fixed


WARNING: since there were so many changes, be careful and do not rely on
the kernel getting everything right, especially when using old arrays with
the new code. Although it should work fine, there might be some problems
and rough edges left.

enjoy. Reports, comments, flames, feature-requests welcome. Let me know if
i have missed/forgotten some patch sent to me. (especially i'd be curious
if Sparc works OK now)

-- mingo