[Lustre-discuss] Looping in __d_lookup
Alex Lyashkov
Alexey.Lyashkov at Sun.COM
Wed Jun 4 02:10:29 PDT 2008
On Tue, 2008-06-03 at 17:05 -0600, Andreas Dilger wrote:
> On Jun 04, 2008 00:19 +0200, Jakob Goldbach wrote:
> > > On Wed, 2008-05-21 at 21:05 +0200, Jakob Goldbach wrote:
> > > >
> > > > So the lockup in __d_lookup may just relate to newer patchless clients.
> >
> > I got rid of my dcache chain corruption by adding patch below and
> > exporting _d_rehash from kernel (offcourse, no longer patchless).
> >
> > Could this fix a race in patchless code ?
> >
> > /Jakob
> >
> > p.s: A kind soul came up with this. Im not a kernel hacker.
> >
> >
> > --- ./lustre/llite/dcache.c.xxx 2007-09-27 16:04:08.000000000 +0400
> > +++ ./lustre/llite/dcache.c 2008-05-29 11:53:07.000000000 +0400
> > @@ -470,8 +470,8 @@ revalidate_finish:
> > spin_lock(&dcache_lock);
> > lock_dentry(de);
> > __d_drop(de);
> > + _d_rehash(de);
> > unlock_dentry(de);
> > - __d_rehash(de, 0);
> > spin_unlock(&dcache_lock);
this will be deadlock with RHEL4 kernel.
cut from rhel4:
void __d_rehash(struct dentry * entry, int lock)
{
struct hlist_head *list = d_hash(entry->d_parent,
entry->d_name.hash);
if (lock)
spin_lock(&dcache_lock);
spin_lock(&entry->d_lock);
entry->d_flags &= ~DCACHE_UNHASHED;
spin_unlock(&entry->d_lock);
entry->d_bucket = list;
hlist_add_head_rcu(&entry->d_hash, list);
if (lock)
spin_unlock(&dcache_lock);
}
More information about the lustre-discuss
mailing list