Browse Source

aufs: add patch needed when also patching in vserver support into the kernel

The vserver patch changes the type of the 'i_flags' field within 'struct inode'
from 'unsigned int' to 'unsigned short'.
stable/0.6
Christian Wiese 11 years ago
parent
commit
7c200743e6
  1. 53
      filesystem/aufs/aufs-vserver-inode-i_flags.diff
  2. 5
      filesystem/aufs/pkg_linux_post.conf

53
filesystem/aufs/aufs-vserver-inode-i_flags.diff

@ -0,0 +1,53 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../aufs/aufs-vserver-inode-i_flags.diff
# Copyright (C) 2014 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
This patch needs to be applied when trying to build aufs on top
of a kernel with patched in linux vserver[1] support.
The vserver patch changes the type of the 'i_flags' field within
'struct inode' from 'unsigned int' to 'unsigned short'.
Initial build time test was done using following version:
linux kernel: 3.10.2
linux vserver patch: patch-3.10.9-vs2.3.6.6.diff [2]
aufs3-standalone: 3.10-20130916
[1] http://linux-vserver.org
[2] http://vserver.13thfloor.at/Experimental/patch-3.10.9-vs2.3.6.6.diff
--- a/fs/aufs/cpup.h
+++ b/fs/aufs/cpup.h
@@ -31,7 +31,7 @@
struct file;
struct au_pin;
-void au_cpup_attr_flags(struct inode *dst, unsigned int iflags);
+void au_cpup_attr_flags(struct inode *dst, unsigned short iflags);
void au_cpup_attr_timesizes(struct inode *inode);
void au_cpup_attr_nlink(struct inode *inode, int force);
void au_cpup_attr_changeable(struct inode *inode);
--- a/fs/aufs/cpup.c
+++ b/fs/aufs/cpup.c
@@ -24,7 +24,7 @@
#include <linux/mm.h>
#include "aufs.h"
-void au_cpup_attr_flags(struct inode *dst, unsigned int iflags)
+void au_cpup_attr_flags(struct inode *dst, unsigned short iflags)
{
const unsigned int mask = S_DEAD | S_SWAPFILE | S_PRIVATE
| S_NOATIME | S_NOCMTIME | S_AUTOMOUNT;

5
filesystem/aufs/pkg_linux_post.conf

@ -35,6 +35,11 @@ if [ ! -z "$pkg_aufs_source_file" ]; then
var_append patchfiles ' ' "$x"
done
# patches needed if the kernel was also patched with the vserver patch
if pkginstalled vserver; then
var_append patchfiles ' ' "$base/package/*/aufs/aufs-vserver-inode-i_flags.diff"
fi
# copying sources into kernel source tree
pkg_aufs_copy_source_files() {
cp -rv $pkg_aufs_tempdir/aufs3-standalone/{Documentation,fs} .

Loading…
Cancel
Save