Re: .config for kernel with flaky inodes.

2007-03-29 Thread sfjro

"Marty Rosenberg":
> > is attached.  It's kinda large and now compressed. I also realized that I
:::

Thank you.
And I want you to try this patch.
Unfortunately this is just a trial, not a solution.
With this patch, I hope your kernel will tell us more information.

Also, I want you to try xino option.
(an old mail)
--
From: [EMAIL PROTECTED]
Subject: Re: AUFS incorrectly identifies files as directories. 
To: "Marty Rosenberg" <[EMAIL PROTECTED]>,
aufs-users@lists.sourceforge.net
Date: Wed, 21 Mar 2007 11:50:44 +0900


> Now your environment is,
> - vanilla 2.6.19 kernel
> - aufs 20070312 (20070319?)
> - seven xfs branches with 773,950 files total
> - ls(1) and find(1) show you crazy inode info
> - after crazy inode, aufs crashes by BUG at vdir.c:605
> 
> I will try it again on my local environment, if you have another thing
> which is related to this problem, please let me know.

I tested again, and found no problem.
One thing I can guess which might be related to your problem is xino
files. Although I am no sure, will you try xino mount option specifying
a non-xfs path?
For example,
# mount -t aufs -o xino=/non-xfs/new-file,br=...

--

Junjiro Okajima

--- marty.config2007-03-30 14:36:03.0 +0900
+++ .config 2007-03-30 15:23:37.0 +0900
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18.8
-# Tue Mar 27 12:10:08 2007
+# Fri Mar 30 15:23:37 2007
 #
 CONFIG_X86_32=y
 CONFIG_GENERIC_TIME=y
@@ -39,11 +39,12 @@
 CONFIG_IKCONFIG_PROC=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_UID16=y
 CONFIG_SYSCTL=y
 CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -65,8 +66,8 @@
 #
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 # CONFIG_KMOD is not set
 
@@ -253,6 +254,7 @@
 CONFIG_PCI_MMCONFIG=y
 # CONFIG_PCIEPORTBUS is not set
 # CONFIG_PCI_MSI is not set
+# CONFIG_PCI_DEBUG is not set
 CONFIG_ISA_DMA_API=y
 # CONFIG_ISA is not set
 # CONFIG_MCA is not set
@@ -437,6 +439,7 @@
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_DEBUG_DRIVER is not set
 # CONFIG_SYS_HYPERVISOR is not set
 
 #
@@ -1509,13 +1489,40 @@
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 # CONFIG_PRINTK_TIME is not set
 CONFIG_MAGIC_SYSRQ=y
-CONFIG_UNUSED_SYMBOLS=y
-# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_RWSEMS is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
 # CONFIG_DEBUG_FS is not set
-# CONFIG_UNWIND_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_FRAME_POINTER is not set
+CONFIG_UNWIND_INFO=y
+CONFIG_STACK_UNWIND=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_EARLY_PRINTK=y
+CONFIG_DEBUG_STACKOVERFLOW=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+
+#
+# Page alloc debug is incompatible with Software Suspend on i386
+#
+# CONFIG_DEBUG_RODATA is not set
+# CONFIG_4KSTACKS is not set
 CONFIG_X86_FIND_SMP_CONFIG=y
 CONFIG_X86_MPPARSE=y
 CONFIG_DOUBLEFAULT=y

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Re: .config for kernel with flaky inodes.

2007-03-29 Thread Marty Rosenberg
> is attached.  It's kinda large and now compressed. I also realized that I
> haven't updated the userspace functions, and when I get home, I'll re-try
> with whatever the new userspace functions are.
> 
> 

Ok, it probably would have been better if I had actually attached the file.  
Whoops.

dot_config.bz2
Description: Binary data
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

.config for kernel with flaky inodes.

2007-03-29 Thread Marty Rosenberg
is attached.  It's kinda large and now compressed.  
I also realized that I haven't updated the userspace functions, and when I get 
home, I'll re-try with whatever the new userspace functions are.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Re: aufs backport to kernel < 2.6.15

2007-03-29 Thread sfjro

Hi Hans,

Hans-Peter Jansen:
> before switching my users to openSUSE 10.2 diskless, I tackled the job of 
> backporting aufs to (at least) 2.6.11 for SuSE 9.3 (diff attached).
:::
>   All kudos to you!

Thank you very much.
I believe you have not only good skills but also frontier spirit.
I am very glad your success.
But I am afraid you will meet some problems in the future.


> I'm overwhelmed by this level of success. Thank you very much. If you visit 
> Germany one day, or I am Japan, I would be pleased to invite you for a nice  
> dinner at large - please let me know, seriously!

Haha, I decided now. Today I shall have a dinner with sausages, potatos,
sour cabbage, Butter AUFS Brot, beer, mit singing Ein Prosit. :-)


> If you want to do me a(nother) favour, please have a look on my changes and 
> give me a note if something stands out badly. I you consider applying 
> something like that, let me know, and I will try to clean it up. 

- The macros LOCK_INODE() and UNLOCK_INODE() are not bad, but where do
  you use them?
- I prefer defining ATTR_FILE as zero, instead of removing.
- it is recommended to define CONFIG_AUFS_DEBUG.


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


aufs backport to kernel < 2.6.15

2007-03-29 Thread Hans-Peter Jansen
Hi Junjiro,

before switching my users to openSUSE 10.2 diskless, I tackled the job of 
backporting aufs to (at least) 2.6.11 for SuSE 9.3 (diff attached).

Note, that I did it "the dirty way" yesterday afternoon, e.g. without 
checking the exact kernel API change revision, and by deactivating some 
(debug?) tests.. 

I rolled out this version today, and the systems (and my users) still behave 
well ;-). I'm even able to write you a letter :-).

  All kudos to you!

Given the problems, I faced with establishing a unionfs-based setup, this is 
just unbelievable. Even long standing minor problems like printing with 
kpdf vanished (which means, your mmap support is working "good enough"). 
I'm overwhelmed by this level of success. Thank you very much. If you visit 
Germany one day, or I am Japan, I would be pleased to invite you for a nice  
dinner at large - please let me know, seriously!

If you want to do me a(nother) favour, please have a look on my changes and 
give me a note if something stands out badly. I you consider applying 
something like that, let me know, and I will try to clean it up. 

If anybody want to use this patch, note that you're on your own, since 
Junjiro is probably not able to help you at all due to lacking a test 
environment, and I'm probably not fluent enough with kernel affairs, short 
in time, or the like.. You have been warned!

Junjiro, thanks again for this wonderful piece of software!

Best wishes and kind regards,
Pete

P.S.: Tomas, don't bash the unionfs people too heavily, relish silently ;-)
diff -up -r aufs-20070327/fs/aufs/aufs.h aufs-20070327-new/fs/aufs/aufs.h
--- aufs-20070327/fs/aufs/aufs.h	2007-03-27 23:41:11.0 +0200
+++ aufs-20070327-new/fs/aufs/aufs.h	2007-03-28 18:21:04.694373683 +0200
@@ -22,11 +22,19 @@
 #define __AUFS_H__
 
 #include 
+#include /* for size_t */
 
 /* -- */
 
-// limited support before 2.6.16, curretly 2.6.15 only.
-#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,15)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+#define LOCK_INODE(inode)   mutex_lock(&(inode)->i_mutex)
+#define UNLOCK_INODE(inode) mutex_unlock(&(inode)->i_mutex)
+#else
+#define LOCK_INODE(inode)   down(&(inode)->i_sem)
+#define UNLOCK_INODE(inode) up(&(inode)->i_sem)
+#endif
+
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
 #define atomic_long_t		atomic_t
 #define atomic_long_set		atomic_set
 #define timespec_to_ns(ts)	({(long long)(ts)->tv_sec;})
@@ -35,6 +43,19 @@
 #define D_CHILD			d_u.d_child
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+# ifdef __CHECKER__
+#  define __bitwise__ __attribute__((bitwise))
+# else
+#  define __bitwise__
+# endif
+
+typedef unsigned __bitwise__ gfp_t;
+void *kzalloc(size_t size, gfp_t flags);
+
+#define do_exit(a)  /* not yet exported */
+#endif
+
 /* -- */
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
diff -up -r aufs-20070327/fs/aufs/branch.c aufs-20070327-new/fs/aufs/branch.c
--- aufs-20070327/fs/aufs/branch.c	2007-03-27 23:41:11.0 +0200
+++ aufs-20070327-new/fs/aufs/branch.c	2007-03-28 16:16:01.956799716 +0200
@@ -754,7 +754,7 @@ int br_mod(struct super_block *sb, struc
 dput(br->br_plink);
 br->br_plink = NULL;
 			}
-#if 1 // test here
+#if 0 // test here
 			DiMustNoWaiters(root);
 			IiMustNoWaiters(root->d_inode);
 			di_write_unlock(root);
Nur in aufs-20070327-new/fs/aufs: .branch.c.swp.
diff -up -r aufs-20070327/fs/aufs/branch.h aufs-20070327-new/fs/aufs/branch.h
--- aufs-20070327/fs/aufs/branch.h	2007-03-27 23:41:11.0 +0200
+++ aufs-20070327-new/fs/aufs/branch.h	2007-03-29 09:42:07.897314461 +0200
@@ -65,10 +65,10 @@ enum {
 /* -- */
 
 #define _AuNoNfsBranchMsg "NFS branch is not supported"
-#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,15)
-#define AuNoNfsBranch
-#define AuNoNfsBranchMsg _AuNoNfsBranchMsg
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) \
+//#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
+//#define AuNoNfsBranch
+//#define AuNoNfsBranchMsg _AuNoNfsBranchMsg
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) \
 	&& !defined(CONFIG_AUFS_LHASH_PATCH)
 #define AuNoNfsBranch
 #define AuNoNfsBranchMsg _AuNoNfsBranchMsg \
Nur in aufs-20070327-new/fs/aufs: .branch.h.swp.
diff -up -r aufs-20070327/fs/aufs/debug.h aufs-20070327-new/fs/aufs/debug.h
--- aufs-20070327/fs/aufs/debug.h	2007-03-27 23:41:12.0 +0200
+++ aufs-20070327-new/fs/aufs/debug.h	2007-03-28 15:40:51.459788803 +0200
@@ -31,10 +31,14 @@
 #define DEBUG_ON(a)	/* */
 #endif
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
 static inline void MtxMustLock(struct mutex *mtx)
 {
 	DEBUG_ON(!mutex_is_locked(mtx));
 }
+#else
+#define MtxMustLock(a)	/* */
+#endif
 
 /* -- */
 
diff -

aufs and vserver

2007-03-29 Thread Wilhelm Meier
Hi,

if anyone is interested to test aufs with linux-vserver, the attached patch 
may be useful.

I tested the following cases:

i) "normal" use of aufs on a vserver-kernel. That is using aufs for 
directories not used as a vserver-root-directory. Seems to be o.k.

ii) using an aufs-union as the root-directory of a vserver. Seems to work, but 
tested only with very, very simple usecases (install, pkgmgmt, filesystem 
traversing). Especially the mmap-support needs care, I think. But no obvious 
quirks at the moment (well done, Junjiro!)

The new nfs-export capability of aufs renders it very, very useful in the case 
of managing diskless-clients. The same applies to vservers, I think. 
Provisioning vservers in this way is very clear and simple. Vserver itself 
supports copy-on-write link-breaking, which has performance benefits compared 
to aufs, sure, but is sometimes awful to deal with.

-- 
Wilhelm
diff -rupN --exclude=CVS aufs.cvs-28032007/aufs/fs/aufs/vfsub.h aufs.cvs-28032007.vserver/aufs/fs/aufs/vfsub.h
--- aufs.cvs-28032007/aufs/fs/aufs/vfsub.h	2007-03-27 16:54:51.0 +0200
+++ aufs.cvs-28032007.vserver/aufs/fs/aufs/vfsub.h	2007-03-28 12:24:01.0 +0200
@@ -24,6 +24,8 @@
 #include 
 #include 
 
+#include "vserver.h"
+
 #ifdef __KERNEL__
 
 /* -- */
diff -rupN --exclude=CVS aufs.cvs-28032007/aufs/fs/aufs/vserver.h aufs.cvs-28032007.vserver/aufs/fs/aufs/vserver.h
--- aufs.cvs-28032007/aufs/fs/aufs/vserver.h	1970-01-01 01:00:00.0 +0100
+++ aufs.cvs-28032007.vserver/aufs/fs/aufs/vserver.h	2007-03-28 12:34:29.0 +0200
@@ -0,0 +1,14 @@
+#ifndef __VSERVER_H
+#define __VSERVER_H
+
+#ifdef VSERVER
+
+#define vfs_symlink(dir, dentry, symname, mode) vfs_symlink(dir, dentry, symname, mode, NULL)
+#define vfs_mknod(dir, dentry, mode, dev) vfs_mknod(dir, dentry, mode, dev, NULL)
+#define vfs_link(src_dentry, dir, dentry) vfs_link(src_dentry, dir, dentry, NULL)
+#define vfs_mkdir(dir, dentry, mode) vfs_mkdir(dir, dentry, mode, NULL)
+#define vfs_rmdir(dir, dentry) vfs_rmdir(dir, dentry, NULL)
+#define vfs_unlink(dir, dentry) vfs_unlink(dir, dentry, NULL)
+#endif
+
+#endif
diff -rupN --exclude=CVS aufs.cvs-28032007/aufs/local.mk aufs.cvs-28032007.vserver/aufs/local.mk
--- aufs.cvs-28032007/aufs/local.mk	2007-03-28 12:56:38.0 +0200
+++ aufs.cvs-28032007.vserver/aufs/local.mk	2007-03-28 12:26:58.0 +0200
@@ -11,15 +11,15 @@ CONFIG_AUFS_BRANCH_MAX_1023 =
 #CONFIG_AUFS_BRANCH_MAX_32767 =
 CONFIG_AUFS_SYSAUFS = y
 CONFIG_AUFS_HINOTIFY =
-CONFIG_AUFS_EXPORT =
+CONFIG_AUFS_EXPORT = y
 #CONFIG_AUFS_AS_BRANCH =
 #CONFIG_AUFS_DLGT =
-CONFIG_AUFS_LHASH_PATCH =
-CONFIG_AUFS_KSIZE_PATCH =
-CONFIG_AUFS_DEBUG = y
+CONFIG_AUFS_LHASH_PATCH = y
+CONFIG_AUFS_KSIZE_PATCH = y
+CONFIG_AUFS_DEBUG = 
 CONFIG_AUFS_COMPAT =
 
-AUFS_DEF_CONFIG =
+AUFS_DEF_CONFIG = -DVSERVER
 -include priv_def.mk
 
 # Ubuntu Edgy (2.6.17-10-*)
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV