[Pvfs2-developers] patch: namei bug fixes
Phil Carns
pcarns at wastedcycles.org
Tue Mar 20 09:36:22 EST 2007
I am sending this patch in a separate email because it may need some
discussion to hash out. Sometime in the past several months, the
pvfs2_lookup() function in namei.c changed (I think along with something
not directly related, but I don't recall exactly what happened now).
This change caused several directory related bugs to show up for us on
2.4 and 2.6 kernels. The 2.4 one was more severe, though, because it
caused a kernel panic. It could be triggered by the "rename01" test in
LTP, or by the following manual steps:
[root at rhel3 pvfs2]# mkdir testdir
[root at rhel3 pvfs2]# cd testdir
[root at rhel3 testdir]# mkdir dir1
[root at rhel3 testdir]# mv dir1 dir2
[root at rhel3 testdir]# ls -alh
total 12K
drwxr-xr-x 1 root root 4.0K Dec 1 12:18 .
drwxrwxrwt 1 root root 4.0K Dec 1 12:17 ..
drwxr-xr-x 1 root root 4.0K Dec 1 12:17 dir2
[root at centos-rhel3 testdir]# rm dir2
<crash>
... so it had something to do with removing a directory that had
previously been renamed.
At any rate, I don't know enough about dentries and inodes anymore to
truly understand the old logic that used to work or the newer logic that
causes us problems. This patch just naively reverts some of the logic
in namei.c to the point that it works again for us (without changing
anything else that was in that set of commits). With this in place, we
don't see any more test case failures or kernel panics on 2.6 or 2.4.
We have been using this patch for several months with success, but it
would probably be a good idea for someone more familiar with this code
to look at the change more carefully.
-Phil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: namei.patch
Type: text/x-patch
Size: 1374 bytes
Desc: not available
Url : http://www.beowulf-underground.org/pipermail/pvfs2-developers/attachments/20070320/4b3ad734/namei.bin
More information about the Pvfs2-developers
mailing list