head	1.1;
access;
symbols
	LKML-branch:1.1.0.2;
locks; strict;
comment	@# @;


1.1
date	2006.10.24.06.14.17;	author jsipek;	state dead;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2006.10.24.06.14.17;	author jsipek;	state Exp;
branches;
next	1.1.2.2;

1.1.2.2
date	2006.11.07.06.13.33;	author jsipek;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	2006.12.01.02.28.38;	author jsipek;	state Exp;
branches;
next	1.1.2.4;

1.1.2.4
date	2006.12.01.02.36.12;	author jsipek;	state Exp;
branches;
next	1.1.2.5;

1.1.2.5
date	2006.12.03.21.49.41;	author jsipek;	state Exp;
branches;
next	1.1.2.6;

1.1.2.6
date	2006.12.04.00.47.21;	author jsipek;	state Exp;
branches;
next	1.1.2.7;

1.1.2.7
date	2006.12.11.14.23.59;	author jsipek;	state Exp;
branches;
next	1.1.2.8;

1.1.2.8
date	2006.12.11.14.47.23;	author jsipek;	state Exp;
branches;
next	1.1.2.9;

1.1.2.9
date	2007.01.05.09.41.33;	author jsipek;	state Exp;
branches;
next	1.1.2.10;

1.1.2.10
date	2007.01.21.23.59.13;	author jsipek;	state Exp;
branches;
next	1.1.2.11;

1.1.2.11
date	2007.01.25.08.38.30;	author jsipek;	state Exp;
branches;
next	1.1.2.12;

1.1.2.12
date	2007.01.28.22.24.33;	author jsipek;	state Exp;
branches;
next	;


desc
@@


1.1
log
@file xattr was initially added on branch LKML-branch.
@
text
@@


1.1.2.1
log
@Move unionfs specific bits into a subdir
@
text
@a0 307
diff -r da84f022f58b fs/Kconfig
--- a/fs/Kconfig	Mon Oct 09 16:23:11 2006 -0400
+++ b/fs/Kconfig	Mon Oct 09 16:23:11 2006 -0400
@@@@ -1463,6 +1463,15 @@@@ config UNION_FS
 	  their physical content separate.
 
 	  See <http://www.unionfs.org> for details
+
+config UNION_FS_XATTR
+	bool "Unionfs extended attributes"
+	depends on UNION_FS
+	help
+	  Extended attributes are name:value pairs associated with inodes by
+	  the kernel or by users (see the attr(5) manual page).
+
+	  If unsure, say N.
 
 endmenu
 
diff -r da84f022f58b fs/unionfs/Makefile
--- a/fs/unionfs/Makefile	Mon Oct 09 16:23:11 2006 -0400
+++ b/fs/unionfs/Makefile	Mon Oct 09 16:23:11 2006 -0400
@@@@ -1,5 +1,7 @@@@ obj-$(CONFIG_UNION_FS) += unionfs.o
 obj-$(CONFIG_UNION_FS) += unionfs.o
 
-unionfs-objs := subr.o dentry.o file.o inode.o main.o super.o \
+unionfs-y := subr.o dentry.o file.o inode.o main.o super.o \
 	stale_inode.o branchman.o rdstate.o copyup.o dirhelper.o \
 	rename.o unlink.o lookup.o commonfops.o dirfops.o sioq.o
+
+unionfs-$(CONFIG_UNION_FS_XATTR) += xattr.o
diff -r da84f022f58b fs/unionfs/copyup.c
--- a/fs/unionfs/copyup.c	Mon Oct 09 16:23:11 2006 -0400
+++ b/fs/unionfs/copyup.c	Mon Oct 09 16:23:11 2006 -0400
@@@@ -18,6 +18,74 @@@@
 
 #include "union.h"
 
+#ifdef CONFIG_UNION_FS_XATTR
+static int copyup_xattrs(struct dentry *old_hidden_dentry,
+			 struct dentry *new_hidden_dentry)
+{
+	int err = 0;
+	ssize_t list_size = -1;
+	char *name_list = NULL;
+	char *attr_value = NULL;
+	char *name_list_orig = NULL;
+
+	list_size = vfs_listxattr(old_hidden_dentry, NULL, 0);
+
+	if (list_size <= 0) {
+		err = list_size;
+		goto out;
+	}
+
+	name_list = xattr_alloc(list_size + 1, XATTR_LIST_MAX);
+	if (!name_list || IS_ERR(name_list)) {
+		err = PTR_ERR(name_list);
+		goto out;
+	}
+	list_size = vfs_listxattr(old_hidden_dentry, name_list, list_size);
+	attr_value = xattr_alloc(XATTR_SIZE_MAX, XATTR_SIZE_MAX);
+	if (!attr_value || IS_ERR(attr_value)) {
+		err = PTR_ERR(name_list);
+		goto out;
+	}
+	name_list_orig = name_list;
+	while (*name_list) {
+		ssize_t size;
+
+		//We need to lock here since vfs_getxattr doesn't lock for us.
+		mutex_lock(&old_hidden_dentry->d_inode->i_mutex);
+		size = vfs_getxattr(old_hidden_dentry, name_list,
+				    attr_value, XATTR_SIZE_MAX);
+		mutex_unlock(&old_hidden_dentry->d_inode->i_mutex);
+		if (size < 0) {
+			err = size;
+			goto out;
+		}
+
+		if (size > XATTR_SIZE_MAX) {
+			err = -E2BIG;
+			goto out;
+		}
+		//We don't need to lock here since vfs_setxattr does it for us.
+		err = vfs_setxattr(new_hidden_dentry, name_list, attr_value,
+				   size, 0);
+
+		if (err < 0)
+			goto out;
+		name_list += strlen(name_list) + 1;
+	}
+      out:
+	name_list = name_list_orig;
+
+	if (name_list)
+		xattr_free(name_list, list_size + 1);
+	if (attr_value)
+		xattr_free(attr_value, XATTR_SIZE_MAX);
+	/* It is no big deal if this fails, we just roll with the punches. */
+	if (err == -ENOTSUPP || err == -EOPNOTSUPP)
+		err = 0;
+	return err;
+}
+#endif /* CONFIG_UNION_FS_XATTR */
+
 /* Determine the mode based on the copyup flags, and the existing dentry. */
 static int copyup_permissions(struct super_block *sb,
 			      struct dentry *old_hidden_dentry,
@@@@ -340,6 +408,12 @@@@ int copyup_named_dentry(struct inode *di
 	if ((err = copyup_permissions(sb, old_hidden_dentry, new_hidden_dentry)))
 		goto out_unlink;
 
+#ifdef CONFIG_UNION_FS_XATTR
+ 	/* Selinux uses extended attributes for permissions. */
+ 	if ((err = copyup_xattrs(old_hidden_dentry, new_hidden_dentry)))
+		goto out_unlink;
+#endif
+
 	/* do not allow files getting deleted to be reinterposed */
 	if (!d_deleted(dentry))
 		unionfs_reinterpose(dentry);
diff -r da84f022f58b fs/unionfs/inode.c
--- a/fs/unionfs/inode.c	Mon Oct 09 16:23:11 2006 -0400
+++ b/fs/unionfs/inode.c	Mon Oct 09 16:23:11 2006 -0400
@@@@ -917,10 +917,22 @@@@ struct inode_operations unionfs_dir_iops
 	.rename = unionfs_rename,
 	.permission = unionfs_permission,
 	.setattr = unionfs_setattr,
+#ifdef CONFIG_UNION_FS_XATTR
+	.setxattr = unionfs_setxattr,
+	.getxattr = unionfs_getxattr,
+	.removexattr = unionfs_removexattr,
+	.listxattr = unionfs_listxattr,
+#endif
 };
 
 struct inode_operations unionfs_main_iops = {
 	.permission = unionfs_permission,
 	.setattr = unionfs_setattr,
+#ifdef CONFIG_UNION_FS_XATTR
+	.setxattr = unionfs_setxattr,
+	.getxattr = unionfs_getxattr,
+	.removexattr = unionfs_removexattr,
+	.listxattr = unionfs_listxattr,
+#endif
 };
 
diff -r da84f022f58b fs/unionfs/union.h
--- a/fs/unionfs/union.h	Mon Oct 09 16:23:11 2006 -0400
+++ b/fs/unionfs/union.h	Mon Oct 09 16:23:11 2006 -0400
@@@@ -40,6 +40,7 @@@@
 #include <linux/string.h>
 #include <linux/vmalloc.h>
 #include <linux/writeback.h>
+#include <linux/xattr.h>
 
 #include <linux/union_fs.h>
 /* the file system name */
@@@@ -317,6 +318,20 @@@@ int unionfs_ioctl_queryfile(struct file 
 /* Verify that a branch is valid. */
 int check_branch(struct nameidata *nd);
 
+#ifdef CONFIG_UNION_FS_XATTR
+/* Extended attribute functions. */
+extern void *xattr_alloc(size_t size, size_t limit);
+extern void xattr_free(void *ptr, size_t size);
+
+extern ssize_t unionfs_getxattr(struct dentry *dentry, const char *name,
+		void *value, size_t size);
+extern int unionfs_removexattr(struct dentry *dentry, const char *name);
+extern ssize_t unionfs_listxattr(struct dentry *dentry, char *list,
+		size_t size);
+extern int unionfs_setxattr(struct dentry *dentry, const char *name,
+		const void *value, size_t size, int flags);
+#endif /* CONFIG_UNION_FS_XATTR */
+
 /* The root directory is unhashed, but isn't deleted. */
 static inline int d_deleted(struct dentry *d)
 {
diff -r da84f022f58b fs/unionfs/xattr.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fs/unionfs/xattr.c	Mon Oct 09 16:23:11 2006 -0400
@@@@ -0,0 +1,123 @@@@
+/*
+ * Copyright (c) 2003-2006 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
+ * Copyright (c) 2005      Arun M. Krishnakumar
+ * Copyright (c) 2004-2006 David P. Quigley
+ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
+ * Copyright (c) 2003      Puja Gupta
+ * Copyright (c) 2003      Harikesavan Krishnan
+ * Copyright (c) 2003-2006 Stony Brook University
+ * Copyright (c) 2003-2006 The Research Foundation of State University of New York*
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include "union.h"
+
+/* This is lifted from fs/xattr.c */
+void *xattr_alloc(size_t size, size_t limit)
+{
+	void *ptr;
+
+	if (size > limit)
+		return ERR_PTR(-E2BIG);
+
+	if (!size)		/* size request, no buffer is needed */
+		return NULL;
+	else if (size <= PAGE_SIZE)
+		ptr = kmalloc(size, GFP_KERNEL);
+	else
+		ptr = vmalloc(size);
+	if (!ptr)
+		return ERR_PTR(-ENOMEM);
+	return ptr;
+}
+
+void xattr_free(void *ptr, size_t size)
+{
+	if (!size)		/* size request, no buffer was needed */
+		return;
+	else if (size <= PAGE_SIZE)
+		kfree(ptr);
+	else
+		vfree(ptr);
+}
+
+/* BKL held by caller.
+ * dentry->d_inode->i_mutex locked
+ */
+ssize_t unionfs_getxattr(struct dentry * dentry, const char *name, void *value,
+		size_t size)
+{
+	struct dentry *hidden_dentry = NULL;
+	int err = -EOPNOTSUPP;
+
+	lock_dentry(dentry);
+
+	hidden_dentry = dtohd(dentry);
+
+	err = vfs_getxattr(hidden_dentry, (char*) name, value, size);
+
+	unlock_dentry(dentry);
+	return err;
+}
+
+/* BKL held by caller.
+ * dentry->d_inode->i_mutex locked
+ */
+int unionfs_setxattr(struct dentry *dentry, const char *name, const void *value,
+		 size_t size, int flags)
+{
+	struct dentry *hidden_dentry = NULL;
+	int err = -EOPNOTSUPP;
+
+	lock_dentry(dentry);
+	hidden_dentry = dtohd(dentry);
+
+	err = vfs_setxattr(hidden_dentry, (char*) name, (void*) value, size, flags);
+
+	unlock_dentry(dentry);
+	return err;
+}
+
+/* BKL held by caller.
+ * dentry->d_inode->i_mutex locked
+ */
+int unionfs_removexattr(struct dentry *dentry, const char *name)
+{
+	struct dentry *hidden_dentry = NULL;
+	int err = -EOPNOTSUPP;
+
+	lock_dentry(dentry);
+	hidden_dentry = dtohd(dentry);
+
+	err = vfs_removexattr(hidden_dentry, (char*) name);
+
+	unlock_dentry(dentry);
+	return err;
+}
+
+/* BKL held by caller.
+ * dentry->d_inode->i_mutex locked
+ */
+ssize_t unionfs_listxattr(struct dentry * dentry, char *list, size_t size)
+{
+	struct dentry *hidden_dentry = NULL;
+	int err = -EOPNOTSUPP;
+	char *encoded_list = NULL;
+
+	lock_dentry(dentry);
+
+	hidden_dentry = dtohd(dentry);
+
+	encoded_list = list;
+	err = vfs_listxattr(hidden_dentry, encoded_list, size);
+
+	unlock_dentry(dentry);
+	return err;
+}
+
@


1.1.2.2
log
@Git generates slightly different diffs - same information, just little
different
@
text
@d1 5
a5 5
diff --git a/fs/Kconfig b/fs/Kconfig
index c53d46e..8eb72bc 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@@@ -1567,6 +1567,15 @@@@ config UNION_FS
d8 1
a8 1
 
d17 1
a17 1
+
d20 4
a23 6
 menu "Network File Systems"
diff --git a/fs/unionfs/Makefile b/fs/unionfs/Makefile
index aad6e3b..7c98325 100644
--- a/fs/unionfs/Makefile
+++ b/fs/unionfs/Makefile
@@@@ -1,5 +1,7 @@@@
d32 3
a34 4
diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c
index 689732e..9df2d99 100644
--- a/fs/unionfs/copyup.c
+++ b/fs/unionfs/copyup.c
d123 3
a125 4
diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
index 7b84f21..8982f31 100644
--- a/fs/unionfs/inode.c
+++ b/fs/unionfs/inode.c
d149 4
a152 5
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index 1a69fb8..9292fe2 100644
--- a/fs/unionfs/union.h
+++ b/fs/unionfs/union.h
@@@@ -40,6 +40,7 @@@@ #include <linux/statfs.h>
d181 3
a183 5
diff --git a/fs/unionfs/xattr.c b/fs/unionfs/xattr.c
new file mode 100644
index 0000000..2900ba6
--- /dev/null
+++ b/fs/unionfs/xattr.c
@


1.1.2.3
log
@Sync
@
text
@d3 3
a5 6

diff -r b39248444887 fs/Kconfig
--- a/fs/Kconfig	Thu Nov 30 16:14:17 2006 -0500
+++ b/fs/Kconfig	Thu Nov 30 16:14:17 2006 -0500
@@@@ -1566,6 +1566,15 @@@@ config UNION_FS
 	  their physical content separate.
d8 1
a8 1
+
d17 1
a17 1
 
d20 6
a25 4
diff -r b39248444887 fs/unionfs/Makefile
--- a/fs/unionfs/Makefile	Thu Nov 30 16:14:17 2006 -0500
+++ b/fs/unionfs/Makefile	Thu Nov 30 16:14:17 2006 -0500
@@@@ -1,5 +1,7 @@@@ obj-$(CONFIG_UNION_FS) += unionfs.o
d34 4
a37 3
diff -r b39248444887 fs/unionfs/copyup.c
--- a/fs/unionfs/copyup.c	Thu Nov 30 16:14:17 2006 -0500
+++ b/fs/unionfs/copyup.c	Thu Nov 30 16:14:17 2006 -0500
d126 5
a130 4
diff -r b39248444887 fs/unionfs/inode.c
--- a/fs/unionfs/inode.c	Thu Nov 30 16:14:17 2006 -0500
+++ b/fs/unionfs/inode.c	Thu Nov 30 16:14:17 2006 -0500
@@@@ -923,10 +923,22 @@@@ struct inode_operations unionfs_dir_iops
d153 5
a157 4
diff -r b39248444887 fs/unionfs/union.h
--- a/fs/unionfs/union.h	Thu Nov 30 16:14:17 2006 -0500
+++ b/fs/unionfs/union.h	Thu Nov 30 16:14:38 2006 -0500
@@@@ -40,6 +40,7 @@@@
a161 1
 #include <linux/fs_stack.h>
d164 1
d186 5
a190 3
diff -r b39248444887 fs/unionfs/xattr.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fs/unionfs/xattr.c	Thu Nov 30 16:14:17 2006 -0500
@


1.1.2.4
log
@Remove git crud & nicer makefile
@
text
@d1 6
a6 3
diff -r 622685e6fd5c fs/Kconfig
--- a/fs/Kconfig	Thu Nov 30 21:28:37 2006 -0500
+++ b/fs/Kconfig	Thu Nov 30 21:29:19 2006 -0500
d23 8
a30 5
diff -r 622685e6fd5c fs/unionfs/Makefile
--- a/fs/unionfs/Makefile	Thu Nov 30 21:28:37 2006 -0500
+++ b/fs/unionfs/Makefile	Thu Nov 30 21:29:19 2006 -0500
@@@@ -3,3 +3,5 @@@@ unionfs-y := subr.o dentry.o file.o inod
 unionfs-y := subr.o dentry.o file.o inode.o main.o super.o \
d35 3
a37 3
diff -r 622685e6fd5c fs/unionfs/copyup.c
--- a/fs/unionfs/copyup.c	Thu Nov 30 21:28:37 2006 -0500
+++ b/fs/unionfs/copyup.c	Thu Nov 30 21:29:19 2006 -0500
d126 4
a129 4
diff -r 622685e6fd5c fs/unionfs/inode.c
--- a/fs/unionfs/inode.c	Thu Nov 30 21:28:37 2006 -0500
+++ b/fs/unionfs/inode.c	Thu Nov 30 21:29:19 2006 -0500
@@@@ -924,10 +924,22 @@@@ struct inode_operations unionfs_dir_iops
d152 3
a154 3
diff -r 622685e6fd5c fs/unionfs/union.h
--- a/fs/unionfs/union.h	Thu Nov 30 21:28:37 2006 -0500
+++ b/fs/unionfs/union.h	Thu Nov 30 21:29:19 2006 -0500
d184 1
a184 1
diff -r 622685e6fd5c fs/unionfs/xattr.c
d186 1
a186 1
+++ b/fs/unionfs/xattr.c	Thu Nov 30 21:29:19 2006 -0500
@


1.1.2.5
log
@Collapsed macro patch into unionfs proper
@
text
@d1 3
a3 3
diff -r 76bde83db99d fs/Kconfig
--- a/fs/Kconfig	Sun Dec 03 16:41:29 2006 -0500
+++ b/fs/Kconfig	Sun Dec 03 16:41:40 2006 -0500
d20 3
a22 3
diff -r 76bde83db99d fs/unionfs/Makefile
--- a/fs/unionfs/Makefile	Sun Dec 03 16:41:29 2006 -0500
+++ b/fs/unionfs/Makefile	Sun Dec 03 16:41:40 2006 -0500
d29 4
a32 4
diff -r 76bde83db99d fs/unionfs/copyup.c
--- a/fs/unionfs/copyup.c	Sun Dec 03 16:41:29 2006 -0500
+++ b/fs/unionfs/copyup.c	Sun Dec 03 16:42:03 2006 -0500
@@@@ -18,6 +18,75 @@@@
a36 1
+/* copyup all extended attrs for a given dentry */
d107 1
a107 1
@@@@ -343,6 +412,12 @@@@ int copyup_named_dentry(struct inode *di
d120 4
a123 4
diff -r 76bde83db99d fs/unionfs/inode.c
--- a/fs/unionfs/inode.c	Sun Dec 03 16:41:29 2006 -0500
+++ b/fs/unionfs/inode.c	Sun Dec 03 16:41:40 2006 -0500
@@@@ -917,10 +917,22 @@@@ struct inode_operations unionfs_dir_iops
d146 3
a148 3
diff -r 76bde83db99d fs/unionfs/union.h
--- a/fs/unionfs/union.h	Sun Dec 03 16:41:29 2006 -0500
+++ b/fs/unionfs/union.h	Sun Dec 03 16:41:40 2006 -0500
d157 1
a157 1
@@@@ -315,6 +316,20 @@@@ int unionfs_ioctl_queryfile(struct file 
d178 1
a178 1
diff -r 76bde83db99d fs/unionfs/xattr.c
d180 1
a180 1
+++ b/fs/unionfs/xattr.c	Sun Dec 03 16:41:47 2006 -0500
d242 1
a242 1
+	hidden_dentry = unionfs_lower_dentry(dentry);
d260 1
a260 1
+	hidden_dentry = unionfs_lower_dentry(dentry);
d277 1
a277 1
+	hidden_dentry = unionfs_lower_dentry(dentry);
d296 1
a296 1
+	hidden_dentry = unionfs_lower_dentry(dentry);
@


1.1.2.6
log
@Remove git cruft and add 2 patch descriptions
@
text
@a0 10
Unionfs: Extended Attributes support

From: Josef "Jeff" Sipek <jsipek@@cs.sunysb.edu>

Extended attribute support.

Signed-off-by: Josef "Jeff" Sipek <jsipek@@cs.sunysb.edu>
Signed-off-by: David Quigley <dquigley@@fsl.cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@@cs.sunysb.edu>

@


1.1.2.7
log
@Folded unionfs-lkml-comments-jan
@
text
@d11 3
a13 3
diff -r 45b2f69b4e55 fs/Kconfig
--- a/fs/Kconfig	Mon Dec 11 09:10:42 2006 -0500
+++ b/fs/Kconfig	Mon Dec 11 09:10:45 2006 -0500
d30 3
a32 3
diff -r 45b2f69b4e55 fs/unionfs/Makefile
--- a/fs/unionfs/Makefile	Mon Dec 11 09:10:42 2006 -0500
+++ b/fs/unionfs/Makefile	Mon Dec 11 09:10:45 2006 -0500
d39 3
a41 3
diff -r 45b2f69b4e55 fs/unionfs/copyup.c
--- a/fs/unionfs/copyup.c	Mon Dec 11 09:10:42 2006 -0500
+++ b/fs/unionfs/copyup.c	Mon Dec 11 09:14:14 2006 -0500
d64 1
a64 1
+	name_list = unionfs_xattr_alloc(list_size + 1, XATTR_LIST_MAX);
d70 1
a70 1
+	attr_value = unionfs_xattr_alloc(XATTR_SIZE_MAX, XATTR_SIZE_MAX);
d79 1
a79 1
+		/* Lock here since vfs_getxattr doesn't lock for us */
d93 1
a93 1
+		/* Don't lock here since vfs_setxattr does it for us. */
d105 1
a105 1
+		unionfs_xattr_free(name_list, list_size + 1);
d107 1
a107 1
+		unionfs_xattr_free(attr_value, XATTR_SIZE_MAX);
d118 1
a118 1
@@@@ -344,6 +413,12 @@@@ int copyup_named_dentry(struct inode *di
d131 7
a137 7
diff -r 45b2f69b4e55 fs/unionfs/inode.c
--- a/fs/unionfs/inode.c	Mon Dec 11 09:10:42 2006 -0500
+++ b/fs/unionfs/inode.c	Mon Dec 11 09:11:34 2006 -0500
@@@@ -927,10 +927,22 @@@@ struct inode_operations unionfs_dir_iops
 	.rename		= unionfs_rename,
 	.permission	= unionfs_permission,
 	.setattr	= unionfs_setattr,
d139 4
a142 4
+	.setxattr	= unionfs_setxattr,
+	.getxattr	= unionfs_getxattr,
+	.removexattr	= unionfs_removexattr,
+	.listxattr	= unionfs_listxattr,
d147 2
a148 2
 	.permission	= unionfs_permission,
 	.setattr	= unionfs_setattr,
d150 4
a153 4
+	.setxattr	= unionfs_setxattr,
+	.getxattr	= unionfs_getxattr,
+	.removexattr	= unionfs_removexattr,
+	.listxattr	= unionfs_listxattr,
d157 4
a160 4
diff -r 45b2f69b4e55 fs/unionfs/union.h
--- a/fs/unionfs/union.h	Mon Dec 11 09:10:42 2006 -0500
+++ b/fs/unionfs/union.h	Mon Dec 11 09:12:10 2006 -0500
@@@@ -38,6 +38,7 @@@@
a165 1
 #include <linux/magic.h>
d167 2
a168 1
@@@@ -327,6 +328,20 @@@@ int unionfs_ioctl_queryfile(struct file 
d174 2
a175 2
+extern void *unionfs_xattr_alloc(size_t size, size_t limit);
+extern void unionfs_xattr_free(void *ptr, size_t size);
d189 1
a189 1
diff -r 45b2f69b4e55 fs/unionfs/xattr.c
d191 1
a191 1
+++ b/fs/unionfs/xattr.c	Mon Dec 11 09:10:45 2006 -0500
@


1.1.2.8
log
@Forgot to rename xattr_{alloc,free}
@
text
@d11 3
a13 3
diff -r 006765d4baa5 fs/Kconfig
--- a/fs/Kconfig	Mon Dec 11 09:31:16 2006 -0500
+++ b/fs/Kconfig	Mon Dec 11 09:31:16 2006 -0500
d30 3
a32 3
diff -r 006765d4baa5 fs/unionfs/Makefile
--- a/fs/unionfs/Makefile	Mon Dec 11 09:31:16 2006 -0500
+++ b/fs/unionfs/Makefile	Mon Dec 11 09:31:16 2006 -0500
d39 3
a41 3
diff -r 006765d4baa5 fs/unionfs/copyup.c
--- a/fs/unionfs/copyup.c	Mon Dec 11 09:31:16 2006 -0500
+++ b/fs/unionfs/copyup.c	Mon Dec 11 09:31:16 2006 -0500
d131 3
a133 3
diff -r 006765d4baa5 fs/unionfs/inode.c
--- a/fs/unionfs/inode.c	Mon Dec 11 09:31:16 2006 -0500
+++ b/fs/unionfs/inode.c	Mon Dec 11 09:31:16 2006 -0500
d157 3
a159 3
diff -r 006765d4baa5 fs/unionfs/union.h
--- a/fs/unionfs/union.h	Mon Dec 11 09:31:16 2006 -0500
+++ b/fs/unionfs/union.h	Mon Dec 11 09:31:16 2006 -0500
d189 1
a189 1
diff -r 006765d4baa5 fs/unionfs/xattr.c
d191 1
a191 1
+++ b/fs/unionfs/xattr.c	Mon Dec 11 09:40:27 2006 -0500
d214 1
a214 1
+void *unionfs_xattr_alloc(size_t size, size_t limit)
d232 1
a232 1
+void unionfs_xattr_free(void *ptr, size_t size)
@


1.1.2.9
log
@Whitespace fixes
@
text
@d11 5
a15 5
diff --git a/fs/Kconfig b/fs/Kconfig
index 2e519f4..cf46c71 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@@@ -1564,6 +1564,15 @@@@ config UNION_FS
d18 1
a18 1
 
d27 1
a27 1
+
d30 4
a33 6
 menu "Network File Systems"
diff --git a/fs/unionfs/Makefile b/fs/unionfs/Makefile
index 25dd78f..7c98325 100644
--- a/fs/unionfs/Makefile
+++ b/fs/unionfs/Makefile
@@@@ -3,3 +3,5 @@@@ obj-$(CONFIG_UNION_FS) += unionfs.o
d39 3
a41 4
diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c
index ad70b24..1d59ff3 100644
--- a/fs/unionfs/copyup.c
+++ b/fs/unionfs/copyup.c
d118 1
a118 1
@@@@ -344,6 +413,12 @@@@ int copyup_named_dentry(struct inode *dir, struct dentry *dentry,
d123 2
a124 2
+	/* Selinux uses extended attributes for permissions. */
+	if ((err = copyup_xattrs(old_hidden_dentry, new_hidden_dentry)))
d131 4
a134 5
diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
index 1bbef1c..36f2660 100644
--- a/fs/unionfs/inode.c
+++ b/fs/unionfs/inode.c
@@@@ -930,10 +930,22 @@@@ struct inode_operations unionfs_dir_iops = {
d157 3
a159 4
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index 624132b..f08eb75 100644
--- a/fs/unionfs/union.h
+++ b/fs/unionfs/union.h
d168 1
a168 1
@@@@ -327,6 +328,20 @@@@ int unionfs_ioctl_queryfile(struct file *file, unsigned int cmd,
d189 3
a191 5
diff --git a/fs/unionfs/xattr.c b/fs/unionfs/xattr.c
new file mode 100644
index 0000000..881a05d
--- /dev/null
+++ b/fs/unionfs/xattr.c
d265 1
a265 1
+		size_t size, int flags)
@


1.1.2.10
log
@A. Bunk's patch, more akpm comments, new copyright
@
text
@d42 1
a42 1
index 7d739d1..97ab571 100644
d135 1
a135 1
index 96631be..8246d15 100644
d162 1
a162 1
index cb5b8e2..b6e03ff 100644
d196 1
a196 1
index 0000000..4705f46
d201 1
a201 1
+ * Copyright (c) 2003-2007 Erez Zadok
d203 1
a203 1
+ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek
d210 2
a211 2
+ * Copyright (c) 2003-2007 Stony Brook University
+ * Copyright (c) 2003-2007 The Research Foundation of State University of New York*
@


1.1.2.11
log
@Removed stale_inode.c & associated patches

stale_inode.c seemed to be completely superfluous, and needed to be synced
up with current version of bad_inode.c or dropped. Dropping is considerably
cleaner.
@
text
@d32 1
a32 1
index ef02ca3..e6b2e0c 100644
d37 2
a38 2
 	branchman.o rdstate.o copyup.o dirhelper.o rename.o \
 	unlink.o lookup.o commonfops.o dirfops.o sioq.o
d162 1
a162 1
index ab80a19..637f9f0 100644
@


1.1.2.12
log
@Remove stale_inode.c the proper way - separate patch
@
text
@d32 1
a32 1
index 25dd78f..e6b2e0c 100644
d35 1
a35 3
@@@@ -1,5 +1,7 @@@@
 obj-$(CONFIG_UNION_FS) += unionfs.o
 
d37 2
a38 4
-	stale_inode.o branchman.o rdstate.o copyup.o dirhelper.o \
-	rename.o unlink.o lookup.o commonfops.o dirfops.o sioq.o
+	branchman.o rdstate.o copyup.o dirhelper.o rename.o \
+	unlink.o lookup.o commonfops.o dirfops.o sioq.o
d162 1
a162 1
index cb5b8e2..b6e03ff 100644
@


