[Pvfs2-developers] kernel module copy attrs race

2008-03-25 Thread Sam Lang
I've been debugging a problem with simul returning EACCES errors on open of a PVFS file. It turns out the bug was due to permissions being (re-)set on an inode without a mutex locking the write. This was causing the permissions checks in other opens of the same file to fail because the

Re: [Pvfs2-developers] kernel module copy attrs race

2008-03-25 Thread Pete Wyckoff
[EMAIL PROTECTED] wrote on Tue, 25 Mar 2008 12:10 -0500: > I've been debugging a problem with simul returning EACCES errors on open of > a PVFS file. It turns out the bug was due to permissions being (re-)set on > an inode without a mutex locking the write. This was causing the > permissions c

Re: [Pvfs2-developers] kernel module copy attrs race

2008-03-25 Thread Sam Lang
Attached patch adds the lock around the getattr for revalidate. It also includes some cleanup to the d_revalidate function for my sanity. -sam fix-attr-race.patch Description: Binary data On Mar 25, 2008, at 12:19 PM, Pete Wyckoff wrote: [EMAIL PROTECTED] wrote on Tue, 25 Mar 2008 12

Re: [Pvfs2-developers] kernel module copy attrs race

2008-03-25 Thread Pete Wyckoff
[EMAIL PROTECTED] wrote on Tue, 25 Mar 2008 14:01 -0500: > Attached patch adds the lock around the getattr for revalidate. It also > includes some cleanup to the d_revalidate function for my sanity. Looks good to me. I didn't study all the whitespace changes in detail. > Index: src/kernel/linu

Re: [Pvfs2-developers] kernel module copy attrs race

2008-03-25 Thread Sam Lang
On Mar 25, 2008, at 2:40 PM, Pete Wyckoff wrote: [EMAIL PROTECTED] wrote on Tue, 25 Mar 2008 14:01 -0500: Attached patch adds the lock around the getattr for revalidate. It also includes some cleanup to the d_revalidate function for my sanity. Looks good to me. I didn't study all the whit

Re: [Pvfs2-developers] kernel module copy attrs race

2008-03-25 Thread Pete Wyckoff
[EMAIL PROTECTED] wrote on Tue, 25 Mar 2008 15:10 -0500: > In fact our error handling here looks to be a little wrong. When we return > 0 from d_revalidate, the kernel assumes the file has been removed and > populates the dcache with a negative dentry (then tries to create the file > in the ope