To build Unionfs, there are two main components:

- unionfs.o: the kernel module

- unionctl: a user utility which allows you to add and remove branches

You should be able to just type "make" and Unionfs will build itself.
The Makefile will look for your running kernel sources in
/lib/modules/`uname -r`/build/include.  If your kernel sources are
located in a different directory, create a "fistdev.mk" file along the
lines of: TOPINC=-I/path/to/my/kernel/sources/linux-2.4.xx/include

There are two Makefile options related to extended attribute support,
which is turned off by default.  You should define UNIONFS_XATTR to turn
it on.  Vanilla kernels should work automatically, but if you (or your
vendor) has applied the ACL/EA patches you might need to define
FIST_SETXATTR_CONSTVOID to correct the setxattr operation's function
prototype.

Using fistdev.mk, you can also turn off the debugging print system,
which adds to the modules code size significantly.  Just add
"EXTRACFLAGS=-DNODEBUG" to fistdev.mk.

The doit.sh script included in the distribution will mount unionfs
with two branches (/branch0 and /branch1) by default.  You can use it
as an example and edit to your tastes.

To install unionfs run "make install".  This copies unionfs.o into
/lib/modules/`uname -r`/kernel/fs/; copies the utilities into
/usr/local/sbin; and copies man pages into /usr/local/man;

Define options summary:
UNIONFS_XATTR		Enable extended attribute support
FIST_SETXATTR_CONSTVOID	Change prototypes of setxattr function for some
			vendor kernels
NODEBUG			Turn off debugging facility (reduces code size)
UNIONFS_UNSUPPORTED	Bypass kernel versions checks.

Known interactions with other kernel features/patches:
* Unionfs causes bugs on preemptive kernels

* Selinux requires extended attributes (but has not been tested)

* Linux vserver changes the definition of IS_IMMUTABLE, you need to do
  something like the following to fix unionfs/namei.c:
--- namei.c.org Thu Jan 13 03:18:06 2005
+++ namei.c     Thu Jan 13 03:38:17 2005
@@ -67,7 +67,7 @@
        if (IS_APPEND(dir))
                return -EPERM;
        if (check_sticky(dir, victim->d_inode)||IS_APPEND(victim->d_inode)||
-           IS_IMMUTABLE(victim->d_inode))
+           IS_IMMUTABLE_FILE(victim->d_inode)||IS_IMMUTABLE_LINK(victim->d_inode))
                return -EPERM;
        if (isdir) {
                if (!S_ISDIR(victim->d_inode->i_mode))

* Stacking on NTFS and Reiserfs can cause problems

Other known limitations:
* Extended attributes are not handled on copyup

* The object code is much larger than it could be
