[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Backport of aufs



Hello,

It is possible to backport the "lenny" version (0+20070904-1) of
"aufs" to "etch" with a minor patch that reinstates the Debian
specific patches for the vserver kernels. The relevant patch is
attached and needs to be placed in debian/patches before building.

aufs is a stackable filesystem a la unionfs with (for me) one
important difference --- it works with vserver.

The source package builds the "aufs-source" package that needs to be
built using module-assistant and installed in order to make use of
aufs.

It also builds "aufs-tools" which allows dynamic modication of the
filesystem stack.

Please let me know if it is OK to upload aufs to backports.

Regards,

Kapil.
--

#! /bin/sh /usr/share/dpatch/dpatch-run
## 01_vserver.dpatch by Julian Andres Klode <jak@jak-linux.org>
##
## DP: Enable vserver support (based on upstream's vserver.patch)

@DPATCH@
diff -urNad --exclude=.bzr --exclude='*~' aufs-0+20070709~/fs/aufs/vfsub.h aufs-0+20070709/fs/aufs/vfsub.h
--- aufs-0+20070709~/fs/aufs/vfsub.h	2007-09-18 06:26:03.000000000 +0000
+++ aufs-0+20070709/fs/aufs/vfsub.h	2007-09-18 06:31:07.000000000 +0000
@@ -201,7 +201,11 @@
 	LKTRTrace("i%lu, %.*s, %s, 0x%x\n",
 		  dir->i_ino, DLNPair(dentry), symname, mode);
 
+#ifdef CONFIG_VSERVER
+	err = vfs_symlink(dir, dentry, symname, mode, NULL);
+#else
 	err = vfs_symlink(dir, dentry, symname, mode);
+#endif
 	if (!err) {
 		au_update_fuse_h_inode(NULL, dentry->d_parent); /*ignore*/
 		au_update_fuse_h_inode(NULL, dentry); /*ignore*/
@@ -217,7 +221,11 @@
 
 	LKTRTrace("i%lu, %.*s, 0x%x\n", dir->i_ino, DLNPair(dentry), mode);
 
+#ifdef CONFIG_VSERVER
+	err = vfs_mknod(dir, dentry, mode, dev, NULL);
+#else
 	err = vfs_mknod(dir, dentry, mode, dev);
+#endif
 	if (!err) {
 		au_update_fuse_h_inode(NULL, dentry->d_parent); /*ignore*/
 		au_update_fuse_h_inode(NULL, dentry); /*ignore*/
@@ -235,7 +243,11 @@
 		  DLNPair(src_dentry), dir->i_ino, DLNPair(dentry));
 
 	lockdep_off();
+#ifdef CONFIG_VSERVER
+	err = vfs_link(src_dentry, dir, dentry, NULL);
+#else
 	err = vfs_link(src_dentry, dir, dentry);
+#endif
 	lockdep_on();
 	if (!err) {
 		LKTRTrace("src_i %p, dst_i %p\n", src_dentry->d_inode, dentry->d_inode);
@@ -275,7 +287,11 @@
 
 	LKTRTrace("i%lu, %.*s, 0x%x\n", dir->i_ino, DLNPair(dentry), mode);
 
+#ifdef CONFIG_VSERVER
+	err = vfs_mkdir(dir, dentry, mode, NULL);
+#else
 	err = vfs_mkdir(dir, dentry, mode);
+#endif
 	if (!err) {
 		au_update_fuse_h_inode(NULL, dentry->d_parent); /*ignore*/
 		au_update_fuse_h_inode(NULL, dentry); /*ignore*/
@@ -290,7 +306,11 @@
 	LKTRTrace("i%lu, %.*s\n", dir->i_ino, DLNPair(dentry));
 
 	lockdep_off();
+#ifdef CONFIG_VSERVER
+	err = vfs_rmdir(dir, dentry, NULL);
+#else
 	err = vfs_rmdir(dir, dentry);
+#endif
 	lockdep_on();
 	if (!err)
 		au_update_fuse_h_inode(NULL, dentry->d_parent); /*ignore*/
@@ -305,7 +325,11 @@
 
 	/* vfs_unlink() locks inode */
 	lockdep_off();
+#ifdef CONFIG_VSERVER
+	err = vfs_unlink(dir, dentry, NULL);
+#else
 	err = vfs_unlink(dir, dentry);
+#endif
 	lockdep_on();
 	if (!err)
 		au_update_fuse_h_inode(NULL, dentry->d_parent); /*ignore*/

Reply to: