Hello community, here is the log from the commit of package aufs checked in at Sun Apr 20 20:52:11 CEST 2008. -------- --- aufs/aufs.changes 2008-03-28 15:37:28.000000000 +0100 +++ aufs/aufs.changes 2008-04-16 22:24:17.000000000 +0200 @@ -1,0 +2,5 @@ +Wed Apr 16 22:19:41 CEST 2008 - jeffm@suse.com + +- Added fix for ia_file/fsetattr changes + +------------------------------------------------------------------- New: ---- aufs-fsetattr ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ aufs.spec ++++++ --- /var/tmp/diff_new_pack.H26540/_old 2008-04-20 20:50:23.000000000 +0200 +++ /var/tmp/diff_new_pack.H26540/_new 2008-04-20 20:50:23.000000000 +0200 @@ -18,13 +18,14 @@ License: GPL v2 or later Group: System/Filesystems Version: cvs20080324 -Release: 9 +Release: 11 Source0: aufs-%{version}.tar.bz2 Source100: preamble Patch0: aa-hack Patch1: local.mk-fix Patch2: aufs-stack-protect-stub.diff Patch3: aufs-2.6.25-api.diff +Patch4: aufs-fsetattr # Patch3: aufs-cvs20071112.dif Url: http://aufs.sf.net BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -65,6 +66,7 @@ %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build export EXTRA_CFLAGS="$RPM_OPT_FLAGS" @@ -103,6 +105,8 @@ /usr/share/man/man?/* %changelog +* Thu Apr 17 2008 jeffm@suse.com +- Added fix for ia_file/fsetattr changes * Fri Mar 28 2008 jeffm@suse.com - update to CVS 2008-03-24, lots of bug fixes * Tue Mar 11 2008 jeffm@suse.com @@ -110,7 +114,7 @@ * Wed Jan 30 2008 duwe@suse.de - update to CVS 2008-01-28, fixing bugs (BNC) [#356902],#353881 and maybe #328798 -* Thu Jan 24 2008 coolo@suse.de +* Fri Jan 25 2008 coolo@suse.de - update to current cvs (20080124) * Mon Nov 12 2007 ro@suse.de - update to current cvs (20071112) ++++++ aufs-fsetattr ++++++ From: Jeff Mahoney <jeffm@suse.com> Subject: Add fsetattr An AppArmor patch removed ia_file and ATTR_FILE from struct iattr and replaced it with the fsetattr file_operation. This patch fixes aufs to use it. Signed-off-by: Jeff Mahoney <jeffm@suse.com> --- fs/aufs/dir.c | 1 + fs/aufs/f_op.c | 1 + fs/aufs/i_op.c | 26 ++++++++++++++------------ fs/aufs/inode.h | 1 + fs/aufs/misc.c | 5 ++--- fs/aufs/vfsub.c | 13 ++++++++++--- fs/aufs/vfsub.h | 2 ++ 7 files changed, 31 insertions(+), 18 deletions(-) --- a/fs/aufs/dir.c +++ b/fs/aufs/dir.c @@ -573,4 +573,5 @@ struct file_operations aufs_dir_fop = { .release = aufs_release_dir, .flush = aufs_flush, .fsync = aufs_fsync_dir, + .fsetattr = aufs_fsetattr, }; --- a/fs/aufs/f_op.c +++ b/fs/aufs/f_op.c @@ -880,4 +880,5 @@ struct file_operations aufs_file_fop = { .splice_write = aufs_splice_write, .splice_read = aufs_splice_read, #endif + .fsetattr = aufs_fsetattr, }; --- a/fs/aufs/i_op.c +++ b/fs/aufs/i_op.c @@ -622,7 +622,8 @@ static long aufs_fallocate(struct inode } #endif -static int aufs_setattr(struct dentry *dentry, struct iattr *ia) +static int aufs_do_setattr(struct dentry *dentry, struct iattr *ia, + struct file *file) { int err; struct inode *inode; @@ -630,7 +631,6 @@ static int aufs_setattr(struct dentry *d struct vfsub_args vargs; struct super_block *sb; __u32 events; - struct file *file; loff_t sz; struct au_icpup_args rargs; @@ -641,13 +641,8 @@ static int aufs_setattr(struct dentry *d sb = dentry->d_sb; si_read_lock(sb, AuLock_FLUSH); - file = NULL; - if (ia->ia_valid & ATTR_FILE) { - /* currently ftruncate(2) only */ - file = ia->ia_file; + if (file) fi_write_lock(file); - ia->ia_file = au_h_fptr(file); - } sz = -1; if ((ia->ia_valid & ATTR_SIZE) @@ -785,16 +780,23 @@ static int aufs_setattr(struct dentry *d } di_write_unlock(dentry); out: - if (file) { - ia->ia_file = file; - //ia->ia_valid |= ATTR_FILE; + if (file) fi_write_unlock(file); - } si_read_unlock(sb); AuTraceErr(err); return err; } +static int aufs_setattr(struct dentry *dentry, struct iattr *ia) +{ + return aufs_do_setattr(dentry, ia, NULL); +} + +int aufs_fsetattr(struct file *file, struct iattr *ia) +{ + return aufs_do_setattr(file->f_dentry, ia, file); +} + /* currently, for fuse only */ #ifdef CONFIG_AUFS_WORKAROUND_FUSE static int aufs_getattr(struct vfsmount *mnt, struct dentry *dentry, --- a/fs/aufs/inode.h +++ b/fs/aufs/inode.h @@ -55,6 +55,7 @@ int aufs_read_inode(struct inode *inode) /* i_op.c */ extern struct inode_operations aufs_iop, aufs_symlink_iop, aufs_dir_iop; +int aufs_fsetattr(struct file *file, struct iattr *ia); /* au_wr_dir flags */ #define AuWrDir_ADD_ENTRY 1 --- a/fs/aufs/misc.c +++ b/fs/aufs/misc.c @@ -266,10 +266,9 @@ int au_copy_file(struct file *dst, struc } while (err == -EAGAIN || err == -EINTR); if (err == 1) { ia->ia_size = dst->f_pos; - ia->ia_valid = ATTR_SIZE | ATTR_FILE; - ia->ia_file = dst; + ia->ia_valid = ATTR_SIZE; vfsub_i_lock_nested(h_i, AuLsc_I_CHILD2); - err = vfsub_notify_change(h_d, ia, &vargs); + err = vfsub_fnotify_change(h_d, ia, &vargs, dst); vfsub_i_unlock(h_i); } } --- a/fs/aufs/vfsub.c +++ b/fs/aufs/vfsub.c @@ -1119,6 +1119,7 @@ struct notify_change_args { struct dentry *h_dentry; struct iattr *ia; struct vfsub_args *vargs; + struct file *file; }; static void call_notify_change(void *args) @@ -1135,7 +1136,7 @@ static void call_notify_change(void *arg if (!IS_IMMUTABLE(h_inode) && !IS_APPEND(h_inode)) { vfsub_ignore(a->vargs); lockdep_off(); - *a->errp = notify_change(a->h_dentry, 0, a->ia); + *a->errp = fnotify_change(a->h_dentry, 0, a->ia, a->file); lockdep_on(); if (!*a->errp) au_update_fuse_h_inode(NULL, a->h_dentry); /*ignore*/ @@ -1145,8 +1146,8 @@ static void call_notify_change(void *arg AuTraceErr(*a->errp); } -int vfsub_notify_change(struct dentry *dentry, struct iattr *ia, - struct vfsub_args *vargs) +int vfsub_fnotify_change(struct dentry *dentry, struct iattr *ia, + struct vfsub_args *vargs, struct file *file) { int err; struct notify_change_args args = { @@ -1173,6 +1174,12 @@ int vfsub_notify_change(struct dentry *d return err; } +int vfsub_notify_change(struct dentry *dentry, struct iattr *ia, + struct vfsub_args *vargs) +{ + return vfsub_fnotify_change(dentry, ia, vargs, NULL); +} + /* ---------------------------------------------------------------------- */ struct unlink_args { --- a/fs/aufs/vfsub.h +++ b/fs/aufs/vfsub.h @@ -613,6 +613,8 @@ int vfsub_sio_rmdir(struct inode *dir, s /* ---------------------------------------------------------------------- */ +int vfsub_fnotify_change(struct dentry *dentry, struct iattr *ia, + struct vfsub_args *vargs, struct file *file); int vfsub_notify_change(struct dentry *dentry, struct iattr *ia, struct vfsub_args *vargs); int vfsub_unlink(struct inode *dir, struct dentry *dentry, ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org