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 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, another process may

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 process may

Re: [Lustre-discuss] question about dcache revalidate

2012-01-17 Thread Lai Siyao
On Tue, Jan 17, 2012 at 5:13 PM, tao.p...@emc.com 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

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, tao.p

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! On Jan 12, 2012, at 3:52 AM

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

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 process

[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 *