To install:

For 2.4:

  - Start with a 2.4.26 tree from kernel.org

  - Apply the 2.4.26 (pre) device mapper patch

For 2.6:

  - Get a 2.6.7 kernel.org tree, it already has device mapper

For both:

  - Make sure device mapper is enabled in the configuration

  - Now:
      cd drivers/md
      tar -xzf csnap-2.4.26.tgz
      cd csnap
      make

  - Apply the csnap-2.4.26 patch that you see in this directory.
    From the root of the 2.4.26 tree:

      patch -p1 <csnap-2.4.26

  - Rebuild the kernel on your test machine, install and reboot

To run tests, you need a couple of block devices named /dev/test-origin 
and /dev/test-snapstore.  These can just be symlinks to test partitions 
on some disk, or they can even be files (I think, but I haven't tested 
this for a while).  Once you have the devices you are ready to go:

      make test

Check out what the test is actually doing by looking in the makefile.  
Basically, it's:

  - try to clean up from a previous test by killing the server and
    removing the dm device

  - recreate the snapshot store, so each test starts clean

  - start the snapshot server

  - create a snapshot or origin client

  - run pokedev, which randomly or sequentially reads or writes a bunch
    of 4K blocks on the snapshot or origin virtual device

Watch the tracing output to see what happened.  The kernel driver 
tracing defaults to on at the moment, so there should be lots of 
console output for each IO transfer.

Please let me know what I've forgotten in the above recipes, so that I 
can incorporate improvements.  One thing: the makefile tests 
arbitrarily bind the server to port 8080, chances are good you are 
using this for something else.  I should think of a better default 
port.  Anyway, just edit the makefile for now.

To remove the test device mapper device:

     make test9

Note note note!  This source tree is in mid-hack!  It's pretty in place 
and ugly in others.
