UPDATE: I’m still seeing some hits to this blog entry, but it is no longer relevant as the UnionFS project now has a patch for 2.6.30. If you are having problems with it, there is a fairly quiet IRC channel (you may have to wait around for a bit) at irc.freenode.net/#unionfs.
UnionFS is a popular filesystem that is used to smash multiple other filesystems together while still keeping them separate. If this is the first time you have heard of it, the idea probably sounds very strange. Believe me, it is very handy. As of the time that I am writing this, we are at release candidate 6 for version 2.6.30 of the linux kernel. The UnionFS patches support 2.6.29-rc2 and Andrew Morton’s -mm branch is lagging at 2.6.28-rc2. With the new 2.6.30 kernel series, SquashFS is included and no longer requires its own patch (though there is no LZMA compression support as of yet). SquashFS is often used alongside UnionFS for the creation of live-cds. This is why I am tinkering with UnionFS on the new kernel line already. If you grab the UnionFS patch for 2.6.29-rc2 and apply it to the 2.6.30 kernel tree, this problem creeps up during the compile:
fs/unionfs/whiteout.c: In function 'create_whiteout':
fs/unionfs/whiteout.c:337: error: dereferencing pointer to incomplete type
This is caused by the compiler being unable to find the fs_struct structure while compiling whiteout.c. My hack, which most likely would not be endorsed, is to add the structure definition to the file. If you open fs/unionfs/whiteout.c, insert this just under the #include directive:
/* From include/linux/fs_struct.h */
struct fs_struct {
int users;
rwlock_t lock;
int umask;
int in_exec;
struct path root, pwd;
};
That should get you on your way. By the way, before doing this, I had tried to include that header file. It caused a few other issues and this was just easier to cope with. As I said, it is a hack.