"Andrew Burgess":
> I tried to do this but rt17 locked up in the middle of editing aufs.h
> So its back to mainstream for me...
Andrew and Tapani,
or anyone else who are trying RT patch on aufs,
Please test this patch.
- it uses 'standard compat_rw_semaphore' instead of 'realtime
rw_semaphore.' I am afraid it may not suit your expectation.
- it just passed simple compilation and mount on 2.6.21.5-rt18.
- assumming CONFIG_PREEMPT_RT is enabled.
Junjiro Okajima
----------------------------------------------------------------------
Index: fs/aufs/branch.c
===================================================================
RCS file: /cvsroot/aufs/aufs/fs/aufs/branch.c,v
retrieving revision 1.53
diff -u -p -r1.53 branch.c
--- fs/aufs/branch.c 25 Jun 2007 00:44:02 -0000 1.53
+++ fs/aufs/branch.c 29 Jun 2007 09:29:24 -0000
@@ -881,7 +881,7 @@ int br_mod(struct super_block *sb, struc
* since BKL (and sbinfo) is locked
*/
AuDebugOn(!kernel_locked());
- list_for_each_entry(file, &sb->s_files, f_u.fu_list) {
+ list_for_each_entry(file, &sb->s_files, FU_LIST) {
LKTRTrace("%.*s\n", DLNPair(file->f_dentry));
if (unlikely(!au_test_aufs_file(file)))
continue;
Index: fs/aufs/f_op.c
===================================================================
RCS file: /cvsroot/aufs/aufs/fs/aufs/f_op.c,v
retrieving revision 1.29
diff -u -p -r1.29 f_op.c
--- fs/aufs/f_op.c 18 Jun 2007 01:47:16 -0000 1.29
+++ fs/aufs/f_op.c 29 Jun 2007 09:29:24 -0000
@@ -402,7 +402,9 @@ static int aufs_mmap(struct file *file,
LKTRTrace("%.*s, %lx, len %lu\n",
DLNPair(dentry), vma->vm_start, vma->vm_end - vma->vm_start);
AuDebugOn(!S_ISREG(dentry->d_inode->i_mode));
+#ifndef CONFIG_PREEMPT_RT
AuDebugOn(down_write_trylock(&vma->vm_mm->mmap_sem));
+#endif
mmapped = au_is_mmapped(file);
wlock = 0;
Index: fs/aufs/misc.h
===================================================================
RCS file: /cvsroot/aufs/aufs/fs/aufs/misc.h,v
retrieving revision 1.28
diff -u -p -r1.28 misc.h
--- fs/aufs/misc.h 18 Jun 2007 01:47:17 -0000 1.28
+++ fs/aufs/misc.h 29 Jun 2007 09:29:24 -0000
@@ -29,6 +29,35 @@
#include <linux/version.h>
#include <linux/aufs_type.h>
+#define FU_LIST f_u.fu_list
+#ifdef CONFIG_PREEMPT_RT
+#undef FU_LIST
+#define FU_LIST f_u.fu_llist
+#define rw_semaphore compat_rw_semaphore
+
+#undef init_rwsem
+#undef down_read
+#undef down_read_nested
+#undef down_read_trylock
+#undef up_read
+#undef downgrade_write
+#undef down_write
+#undef down_write_nested
+#undef down_write_trylock
+#undef up_write
+
+#define init_rwsem compat_init_rwsem
+#define down_read compat_down_read
+#define down_read_nested compat_down_read_nested
+#define down_read_trylock compat_down_read_trylock
+#define up_read compat_up_read
+#define downgrade_write compat_downgrade_write
+#define down_write compat_down_write
+#define down_write_nested compat_down_write_nested
+#define down_write_trylock compat_down_write_trylock
+#define up_write compat_up_write
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
#define I_MUTEX_QUOTA 0
#define lockdep_off() do {} while (0)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/