tags 441307 + patch thanks -- Hello,
The enclosed patch can be put in as "debian/patches/01_vserver.patch" into the unpacked debian source for aufs (0+20070904-1) and then "debuild"-ed. The "aufs-source" package that is built does build as a module using the stock Debian "etch" vserver kernel. Moreover, as far as I could check this module works as expected. I tested all the calls that are modified and these worked inside the container and outside it too. Note however, that I am using "etch" so there may be issues with "lenny" or "sid". To check those I would need to install and fire up "qemu" on a non-vt architecture so I hope you can understand my reluctance :-). Regards, Kapil. --
#! /bin/sh /usr/share/dpatch/dpatch-run ## 01_vserver.dpatch by Kapil Hari Paranjape <[EMAIL PROTECTED]> ## ## DP: Enable vserver support (based on upstream's vserver.patch) and ## earlier 01_vserver.patch from Julian Andres Klode <[EMAIL PROTECTED]> @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-08-13 03:25:27.000000000 +0530 +++ 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*/
signature.asc
Description: Digital signature