Donate Share

aufs

Email Archive: aufs-users (read-only)

2006:
Jan
   
Feb
   
Mar
   
Apr
   
May
   
Jun
(1)
Jul
   
Aug
(9)
Sep
(6)
Oct
(5)
Nov
(6)
Dec
(16)
2007:
Jan
(37)
Feb
(138)
Mar
(102)
Apr
(62)
May
(31)
Jun
(92)
Jul
(71)
Aug
(16)
Sep
(103)
Oct
(76)
Nov
(50)
Dec
(47)
2008:
Jan
(56)
Feb
(58)
Mar
(100)
Apr
(101)
May
(89)
Jun
(32)
Jul
(57)
Aug
(73)
Sep
(40)
Oct
(72)
Nov
(96)
Dec
(31)
2009:
Jan
(43)
Feb
(130)
Mar
(130)
Apr
(120)
May
(68)
Jun
(31)
Jul
(63)
Aug
(39)
Sep
(30)
Oct
(48)
Nov
(26)
Dec
   
From: <flipstar@gm...> - 2007-10-03 21:37
Hello,

im having great trouble to get aufs to work with my 2.6.15 kernel.
The system is a soc (arm based).

aufs version CVS checked out 20071003

NAS> uname -a
Linux #153 Thu Oct 4 04:51:38 CST 2007 armv4l unknown


when I compile the kernel it shows:

...
CC fs/aufs/module.o
CC fs/aufs/super.o
fs/aufs/super.c: In function `aufs_fill_super':
fs/aufs/super.c:667: warning: comparison is always false due to limited
range of data type
CC fs/aufs/sbinfo.o
fs/aufs/sbinfo.c: In function `half_refresh_plink':
fs/aufs/sbinfo.c:421: warning: comparison is always true due to limited
range of data type
CC fs/aufs/xino.o
fs/aufs/xino.c: In function `xino_init':
fs/aufs/xino.c:403: warning: comparison is always true due to limited
range of d ata type
fs/aufs/xino.c: In function `xino_set':
fs/aufs/xino.c:479: warning: comparison is always true due to limited
range of d ata type
fs/aufs/xino.c: In function `xino_def':
fs/aufs/xino.c:582: warning: comparison is always true due to limited
range of d ata type
CC fs/aufs/branch.o
fs/aufs/branch.c: In function `find_rw_br':
fs/aufs/branch.c:121: warning: comparison is always true due to limited
range of data type
....

but that should not be a big thing right?
I also added "Detect Soft Lockups" to the kernel so it is not hanging
at the mount for ever but "dumbs" some infos.



NAS> cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext2 rw,nogrpid 0 0
/proc /proc proc rw,nodiratime 0 0
/sys /sys sysfs rw 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hdc1 /system ext3 rw,data=ordered 0 0
/dev/hdc2 /mnt/ide3 ext3 rw,data=ordered,usrquota,grpquota 0 0


Because the system is currently using busybox 1.0 I also tried GNU mount
but it makes no differences. Also tried mount with and without -n.

The error is always the same (see the strace at the end of the mail).


My guess was that the memory used by aufs might be to much for the soc
to I reduced AUFS_BRANCH_MAX to 12:

include/linux/aufs_type.h

#ifdef CONFIG_AUFS_BRANCH_MAX_127
typedef char aufs_bindex_t;
#define AUFS_BRANCH_MAX 12
/* #define AUFS_BRANCH_MAX 127 */

still the same error.


So for today I have tosay that I wasted about 16h and did not find out a
bit :-(


So please if anybody got an idea let me know!!!
Thanks
--
flip


Ah and I tried that backport patch:
http://www.mail-archive.com/aufs-users@li.../msg00245.html
but it did not help ether.


====================================================

NAS> ../armv4l-bin/strace ../armv4l-bin/mount -t aufs -o br:./rw:/system
none ./aufs

execve("../armv4l-bin/mount", ["../armv4l-bin/mount", "-t", "aufs",
"-o", "br:./rw:/system", "none", "./aufs"], [/* 11 vars */]) = 0
uname({sys="Linux", node="NAS", ...}) = 0
brk(0) = 0x20000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/v4l/half/libblkid.so.1", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/lib/v4l/half", 0xbe9ec3c0) = -1 ENOENT (No such file or
directory)
open("/lib/v4l/libblkid.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib/v4l", 0xbe9ec3c0) = -1 ENOENT (No such file or
directory)
open("/lib/half/libblkid.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib/half", 0xbe9ec3c0) = -1 ENOENT (No such file or
directory)
open("/lib/libblkid.so.1", O_RDONLY) = 5
read(5, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\250\30\0"...,
512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=24112, ...}) = 0
mmap2(NULL, 54916, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0)
= 0x4001e000
mprotect(0x40023000, 34436, PROT_NONE) = 0
mmap2(0x4002b000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x5) = 0x4002b000
close(5) = 0
open("/lib/libuuid.so.1", O_RDONLY) = 5
read(5, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\374\n\0\000"...,
512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=11964, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40015000
mmap2(NULL, 42672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0)
= 0x4002c000
mprotect(0x4002f000, 30384, PROT_NONE) = 0
mmap2(0x40036000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x2) = 0x40036000
close(5) = 0
open("/lib/libc.so.6", O_RDONLY) = 5
read(5, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\210k\1\000"...,
512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=1128948, ...}) = 0
mmap2(NULL, 1144972, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5,
0) = 0x40037000
mprotect(0x40141000, 55436, PROT_NONE) = 0
mmap2(0x40148000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x109) = 0x40148000
mmap2(0x4014d000, 6284, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4014d000
close(5) = 0
mprotect(0x40148000, 8192, PROT_READ) = 0
mprotect(0x4001c000, 4096, PROT_READ) = 0
brk(0) = 0x20000
brk(0x41000) = 0x41000
umask(033) = 022
open("/dev/null", O_RDWR|O_LARGEFILE) = 5
close(5) = 0
open("/etc/blkid.tab", O_RDONLY) = -1 ENOENT (No such file or
directory)
getuid32() = 0
geteuid32() = 0
lstat64("/etc/mtab", {st_mode=S_IFREG|0644, st_size=110, ...}) = 0
stat64("/sbin/mount.aufs", 0xbe9ecaac) = -1 ENOENT (No such file or
directory)
rt_sigprocmask(SIG_BLOCK, ~[TRAP SEGV], NULL, 8) = 0
mount("none", "./aufs", "aufs", MS_MGC_VAL, "br:./rw:/system"BUG: soft
lockup detected on CPU#0!


<-- The system waits at this point for ~10sec and then spits out: BUG:..

Pid: 1311, comm: mount
CPU: 0
pc : [<c0138f64>] lr : [<c013923c>] Not tainted
sp : c78f5ce0 ip : c78f5cb8 fp : c78f5cfc
r10: 00000000 r9 : c059bee0 r8 : 00000010
r7 : c754f668 r6 : c754f998 r5 : 000000ff r4 : 000000e1
r3 : 000000e1 r2 : 00000000 r1 : 000000e1 r0 : c754f998
Flags: Nzcv IRQs on FIQs on Mode SVC_32 Segment user
Control: 397F Table: 07F54000 DAC: 00000015
Function entered at [<c00249d0>] from [<c0054368>]
r4 = C78F5C98
Function entered at [<c0054304>] from [<c0041da0>]
r4 = 00000000
Function entered at [<c0041acc>] from [<c0027bcc>]
Function entered at [<c0027b18>] from [<c002d418>]
r6 = C78F5C98 r5 = 00000000 r4 = C02B64E8
Function entered at [<c002d3f0>] from [<c0023a10>]
Function entered at [<c00239c4>] from [<c0023b54>]
r8 = C0318D44 r7 = C78F5C98 r6 = 0000000F r5 = C0319050
r4 = C02B64E8
Function entered at [<c0023ad4>] from [<c0023d34>]
r7 = C78F5C98 r6 = C02B5DD0 r5 = C78F5CCC r4 = FFFFFFFF
Function entered at [<c0023cdc>] from [<c00229e4>]
r8 = 00000010 r7 = C754F668 r6 = F4800014 r5 = C78F5CCC
r4 = FFFFFFFF
Function entered at [<c0139200>] from [<c0133c84>]
r7 = 00000000 r6 = C750C000 r5 = C7F71000 r4 = 00000000
Function entered at [<c0133c4c>] from [<c01358f0>]
Function entered at [<c01357d0>] from [<c0131e94>]
Function entered at [<c0131c50>] from [<c007dda0>]
Function entered at [<c007dd48>] from [<c0132160>]
r7 = C0309208 r6 = C7F6F000 r5 = FFFFFFF4 r4 = C04F4120
Function entered at [<c0132148>] from [<c007deec>]
Function entered at [<c007de98>] from [<c0095288>]
Function entered at [<c0094e78>] from [<c0095858>]
Function entered at [<c00957c0>] from [<c0022ee4>]
r7 = 00000015 r6 = 00020210 r5 = 000201D0 r4 = 00020210


    From: <sfjro@us...> - 2007-10-04 01:57
    Hello flip,

    "flipstar@gm...":
    > CC fs/aufs/super.o
    > fs/aufs/super.c: In function `aufs_fill_super':
    > fs/aufs/super.c:667: warning: comparison is always false due to limited
    > range of data type
    :::
    > but that should not be a big thing right?

    Your compiler produces a wrong line number.
    So I don't know whether it is a big problem or not.


    > My guess was that the memory used by aufs might be to much for the soc
    > to I reduced AUFS_BRANCH_MAX to 12:

    It has no effect. The minimum value is 127.
    You might guess that aufs allocates memory around AUFS_BRANCH_MAX at
    mount time, but it is wrong.

    Your kernel produceses something like a stack trace after "BUG: soft
    lockup detected on CPU#0!". Can you replace these addresses by symbols?
    If it can, I hope it probably shows which lock caused 'soft lockup.'
    But I don't know ehther it can solve your problem or not.


    While you may already know, I'd like to tell you these things.
    - aufs doesn't support the kernel version before 2.6.16, which means I
    didn't compile and test aufs on linux-2.6.15.
    - aufs shows its version when it is loaded. probably your version is
    20071001 instead of 20071003.


    Junjiro Okajima

    From: <flipstar@gm...> - 2007-10-04 21:50
    Hey Junjiro,

    thanks for your quick reply!

    Im still stuck :-(
    today i download the 2.6.15 source, pached it and tried to
    compile it native (x86).

    I get a:

    LD init/built-in.o
    CHK usr/initramfs_list
    CC fs/aufs/module.o
    In file included from fs/aufs/branch.h:31,
    from fs/aufs/aufs.h:72,
    from fs/aufs/module.c:23:
    fs/aufs/super.h:84: error: field `si_xib_mtx' has incomplete type
    make[2]: *** [fs/aufs/module.o] Error 1
    make[1]: *** [fs/aufs] Error 2
    make: *** [fs] Error 2


    Question:
    Is there anybody using this (old) kernel version 2.6.15
    and can recommend a snapshot that is known to work.

    Thanks

    --
    flip

    From: <sfjro@us...> - 2007-10-05 04:31
    "flipstar@gm...":
    > Im still stuck :-(
    > today i download the 2.6.15 source, pached it and tried to
    > compile it native (x86).

    Here is a patch for you while I didn't test it.


    Junjiro Okajima

    ----------------------------------------------------------------------
    Index: fs/aufs/super.h
    ===================================================================
    RCS file: /cvsroot/aufs/aufs/fs/aufs/super.h,v
    retrieving revision 1.58
    diff -u -p -r1.58 super.h
    --- fs/aufs/super.h 1 Oct 2007 04:47:52 -0000 1.58
    +++ fs/aufs/super.h 5 Oct 2007 04:29:53 -0000
    @@ -24,14 +24,15 @@
    #ifdef __KERNEL__

    #include <linux/fs.h>
    -#include <linux/version.h>
    #include <linux/cramfs_fs.h>
    +#include <linux/version.h>
    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
    #include <linux/magic.h>
    #else
    #include <linux/nfs_fs.h>
    #endif
    #include <linux/aufs_type.h>
    +
    //#include "hinode.h"
    #include "misc.h"
    #include "sysaufs.h"
    @@ -81,7 +82,14 @@ struct aufs_sbinfo {
    readf_t si_xread;
    writef_t si_xwrite;
    struct file *si_xib;
    +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
    struct mutex si_xib_mtx; /* protect xib members */
    +#else
    + struct semaphore si_xib_mtx; /* protect xib members */
    +#define mutex_init(mtx) sema_init(mtx, 1)
    +#define mutex_lock(mtx) down(mtx)
    +#define mutex_unlock(mtx) up(mtx)
    +#endif
    unsigned long *si_xib_buf;
    unsigned long si_xib_last_pindex;
    int si_xib_next_bit;
    Index: fs/aufs/xino.c
    ===================================================================
    RCS file: /cvsroot/aufs/aufs/fs/aufs/xino.c,v
    retrieving revision 1.41
    diff -u -p -r1.41 xino.c
    --- fs/aufs/xino.c 1 Oct 2007 04:49:02 -0000 1.41
    +++ fs/aufs/xino.c 5 Oct 2007 04:29:53 -0000
    @@ -174,6 +174,10 @@ int xino_write(struct super_block *sb, a

    /* ---------------------------------------------------------------------- */

    +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16) \
    + && !defined(BITS_PER_BYTE)
    +#define BITS_PER_BYTE 8
    +#endif
    static const int page_bits = (int)PAGE_SIZE * BITS_PER_BYTE;
    //static const int page_bits = 4;
    static ino_t xib_calc_ino(unsigned long pindex, int bit)

    From: <flipstar@gm...> - 2007-10-05 22:31
    Hello Junjiro,

    a big fat THANK YOU!!!

    Your patch is working perfect for me!!!

    I can now even use the busybox mount to mount aufs!

    Regards
    --
    flip


    sfjro@us... schrieb:
    > "flipstar@gm...":
    >> Im still stuck :-(
    >> today i download the 2.6.15 source, pached it and tried to
    >> compile it native (x86).
    >
    > Here is a patch for you while I didn't test it.
    >
    >
    > Junjiro Okajima
    >
    > ----------------------------------------------------------------------
    > Index: fs/aufs/super.h
    > ===================================================================
    > RCS file: /cvsroot/aufs/aufs/fs/aufs/super.h,v
    > retrieving revision 1.58
    > diff -u -p -r1.58 super.h
    > --- fs/aufs/super.h 1 Oct 2007 04:47:52 -0000 1.58
    > +++ fs/aufs/super.h 5 Oct 2007 04:29:53 -0000
    > @@ -24,14 +24,15 @@
    > #ifdef __KERNEL__
    >
    > #include <linux/fs.h>
    > -#include <linux/version.h>
    > #include <linux/cramfs_fs.h>
    > +#include <linux/version.h>
    > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
    > #include <linux/magic.h>
    > #else
    > #include <linux/nfs_fs.h>
    > #endif
    > #include <linux/aufs_type.h>
    > +
    > //#include "hinode.h"
    > #include "misc.h"
    > #include "sysaufs.h"
    > @@ -81,7 +82,14 @@ struct aufs_sbinfo {
    > readf_t si_xread;
    > writef_t si_xwrite;
    > struct file *si_xib;
    > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
    > struct mutex si_xib_mtx; /* protect xib members */
    > +#else
    > + struct semaphore si_xib_mtx; /* protect xib members */
    > +#define mutex_init(mtx) sema_init(mtx, 1)
    > +#define mutex_lock(mtx) down(mtx)
    > +#define mutex_unlock(mtx) up(mtx)
    > +#endif
    > unsigned long *si_xib_buf;
    > unsigned long si_xib_last_pindex;
    > int si_xib_next_bit;
    > Index: fs/aufs/xino.c
    > ===================================================================
    > RCS file: /cvsroot/aufs/aufs/fs/aufs/xino.c,v
    > retrieving revision 1.41
    > diff -u -p -r1.41 xino.c
    > --- fs/aufs/xino.c 1 Oct 2007 04:49:02 -0000 1.41
    > +++ fs/aufs/xino.c 5 Oct 2007 04:29:53 -0000
    > @@ -174,6 +174,10 @@ int xino_write(struct super_block *sb, a
    >
    > /* ---------------------------------------------------------------------- */
    >
    > +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16) \
    > + && !defined(BITS_PER_BYTE)
    > +#define BITS_PER_BYTE 8
    > +#endif
    > static const int page_bits = (int)PAGE_SIZE * BITS_PER_BYTE;
    > //static const int page_bits = 4;
    > static ino_t xib_calc_ino(unsigned long pindex, int bit)
    >