[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Dazuko-help] Kernel Oops in dazukofs_lookup()
From: |
Lino Sanfilippo |
Subject: |
Re: [Dazuko-help] Kernel Oops in dazukofs_lookup() |
Date: |
Mon, 22 Jun 2009 13:42:34 +0200 |
User-agent: |
Icedove 1.5.0.14eol (X11/20090105) |
Peter Radig wrote:
1. mount -t dazukofs /home
2. mount -t dazuksfs /vol/raid1
3. [UNINTENTIONALLY]: mount -t dazufofs /home
4. umount /home
and sometimes between (2) and (4) that oops happened.
From your description I don't quite get if (3) triggers the bug or if
(1) and (2) is enough. Can you please make that clear?
An easy way to trigger this bug is:
1. mount a subdir of another dir with dazukofs:
#mount -t dazukofs /TESTDIR/subdir /TESTDIR/subdir
2. mount the parent dir of the subdir with dazukofs.
#mount -t dazukofs /TESTDIR
Now there is a dazukofs layer upon 2 other filesystems: the dazukofs
that was mounted first
and the original filesystem (ext3, reiserfs or whatever).
3. touch a file within the subdir that has been mounted as dazukofs.
This will result in the
Oops:
#touch /TESTDIR/subdir/testfile
What happens is:
When touching "testfile" dazukofs has to perform a lookup for the dentry
that represents it. This
lookup crosses the mountpoint /TESTDIR/subdir where the lower superblock
of /TESTDIR differs from the
one of /TESTDIR/subdir. If a superblock of one directory of the
underlaying filesystem differs from
the superblock of one of its subdirs, dazukofs spuriously returns an
error and - even worse - decrements
the usage counter of the lower inode. This leeds to the invalid
inode/dentry state that finally
results in the Oops.
Furthermore, from the whole design of dazukofs, is it safe to mount a
dazukofs over a dazukofs or shouldn't that be blocked?
Normally yes, dazukofs is explicitly designed as a stackable filesystem
and thus it should be possible to
stack it upon an arbitrary filesystem, including dazukofs itself.
But in fact we encountered several problems if dazukofs is stacked upon
itself too often
(20-100 times).
I attached a patch that disables the check that causes all the trouble.
If you would like to try it out, please apply this to the OpenSuse11.1
dazukofs version you are using
from antivir-server-prof-3.0.5-0.
If it works for you, I will provide it "officially" on the dazukofs
devel mailing list.
Good luck!
Lino
Geschäftsführender Gesellschafter: Tjark Auerbach
Sitz der Gesellschaft: Tettnang
Handelsregister: Amtsgericht Ulm, HRB 630992
ALLGEMEINE GESCHÄFTSBEDINGUNGEN
Es gelten unsere Allgemeinen Geschäftsbedingungen
(AGB). Sie finden sie in der jeweils gültigen Fassung
im Internet unter http://www.avira.de/agb
***************************************************
diff -rup dazukofs-3.0.0-rc4_2.6.27_ub_os11.1/inode.c
dazukofs-3.0.0-rc4_2.6.27_ub_os11.1PATCHED/inode.c
--- dazukofs-3.0.0-rc4_2.6.27_ub_os11.1/inode.c 2009-05-11 18:33:45.000000000
+0200
+++ dazukofs-3.0.0-rc4_2.6.27_ub_os11.1PATCHED/inode.c 2009-06-22
12:46:33.000000000 +0200
@@ -75,12 +75,6 @@ int dazukofs_interpose(struct dentry *lo
goto out;
}
- if (lower_inode->i_sb != GET_LOWER_SB(sb)) {
- iput(lower_inode);
- err = -EXDEV;
- goto out;
- }
-
inode = iget5_locked(sb, (unsigned long)lower_inode,
dazukofs_inode_test, dazukofs_inode_set,
lower_inode);