Re: [Lustre-discuss] question about dcache revalidate

2012-01-19 Thread Oleg Drokin
Hello! On Jan 17, 2012, at 4:43 AM, Lai Siyao wrote: > > Normally lustre client doesn't fetch any child lock for lookup(IT_OPEN), > > but a child dentry will be inserted into hash, however this dentry is > > marked INVALID, and it will be freed after file->release(), that means, no > > other pr

Re: [Lustre-discuss] question about dcache revalidate

2012-01-19 Thread Oleg Drokin
Hello! On Jan 17, 2012, at 3:26 AM, Lai Siyao wrote: > Are you referring to ll_lookup_it_finish() that flag negative dentry > DCACHE_LUSTRE_INVALID and hash/unhash it immediately if client doesn't have > UDATE lock? Looks like such dentry is skipped during link path walk as > ll_dcompare checks

Re: [Lustre-discuss] question about dcache revalidate

2012-01-17 Thread tao.peng
Got it. Thanks. Best, Tao From: Lai Siyao [mailto:laisi...@whamcloud.com] Sent: Tuesday, January 17, 2012 5:44 PM To: Peng, Tao Cc: gr...@whamcloud.com; Lustre-discuss@lists.lustre.org Subject: Re: [Lustre-discuss] question about dcache revalidate On Tue, Jan 17, 2012 at 5:13 PM, mailto:tao.p

Re: [Lustre-discuss] question about dcache revalidate

2012-01-17 Thread Lai Siyao
On Tue, Jan 17, 2012 at 5:13 PM, wrote: > > On Jan 12, 2012, at 3:52 AM, Lai Siyao wrote: > > > > > No, to add a dentry to hash client needs holding LOOKUP lock, but > lustre client unhash (see > > ll_unhash_aliases()) doesn't really remove dentry from hash, but set > LUSTRE_DCACHE_INVALID flag.

Re: [Lustre-discuss] question about dcache revalidate

2012-01-17 Thread tao.peng
> On Jan 12, 2012, at 3:52 AM, Lai Siyao wrote: > > > No, to add a dentry to hash client needs holding LOOKUP lock, but lustre > > client unhash (see > ll_unhash_aliases()) doesn't really remove dentry from hash, but set > LUSTRE_DCACHE_INVALID flag. So in > the race you mentioned, another proces

Re: [Lustre-discuss] question about dcache revalidate

2012-01-17 Thread Lai Siyao
> > > On Jan 12, 2012, at 3:52 AM, Lai Siyao wrote: > > > > > No, to add a dentry to hash client needs holding LOOKUP lock, but > lustre client unhash (see > > ll_unhash_aliases()) doesn't really remove dentry from hash, but set > LUSTRE_DCACHE_INVALID flag. So in > > the race you mentioned, anothe

Re: [Lustre-discuss] question about dcache revalidate

2012-01-13 Thread tao.peng
Oleg hi, > -Original Message- > From: Oleg Drokin [mailto:gr...@whamcloud.com] > Sent: Friday, January 13, 2012 12:04 AM > To: Lai Siyao > Cc: Peng, Tao; Lustre-discuss@lists.lustre.org > Subject: Re: [Lustre-discuss] question about dcache revalidate > > Hello! &g

Re: [Lustre-discuss] question about dcache revalidate

2012-01-12 Thread Oleg Drokin
Hello! On Jan 12, 2012, at 3:52 AM, Lai Siyao wrote: > No, to add a dentry to hash client needs holding LOOKUP lock, but lustre > client unhash (see ll_unhash_aliases()) doesn't really remove dentry from > hash, but set LUSTRE_DCACHE_INVALID flag. So in the race you mentioned, > another proces

Re: [Lustre-discuss] question about dcache revalidate

2012-01-12 Thread tao.peng
I see. Thanks a lot for the explanation. Cheers, Tao From: Lai Siyao [mailto:laisi...@whamcloud.com] Sent: Thursday, January 12, 2012 4:53 PM To: Peng, Tao Cc: Lustre-discuss@lists.lustre.org Subject: Re: [Lustre-discuss] question about dcache revalidate No, to add a dentry to hash client needs

Re: [Lustre-discuss] question about dcache revalidate

2012-01-12 Thread Lai Siyao
No, to add a dentry to hash client needs holding LOOKUP lock, but lustre client unhash (see ll_unhash_aliases()) doesn't really remove dentry from hash, but set LUSTRE_DCACHE_INVALID flag. So in the race you mentioned, another process may add the dentry but later the lock is canceled soon, so at th

[Lustre-discuss] question about dcache revalidate

2012-01-11 Thread tao.peng
Hi, I was reading dcache.c and following comments in ll_revalidate_it() seem confusing. Does it mean llite can hash a positive dentry to dcache without taking inode LOOKUP lock? 589 /* 590 * This part is here to combat evil-evil race in real_lookup on 2.6 591 * kernels