Delay in WRITE delegation recall during COMMIT

J. Bruce Fields bfields at fieldses.org
Fri Aug 18 13:44:16 EDT 2006


On Fri, Aug 18, 2006 at 12:09:53PM -0500, Ajay Gulati wrote:
> Hi Bruce,
> You are right, the linux kernel doesn't give out write delegations. I 
> had been playing with write delegations and had 
> modified the code in __setlease() to make it work. I thought I had removed 
> that patch for my current testing but when you mentioned it, I went back 
> and checked again just to find that it was compiled in by mistake. Here is 
> the change in __setlease() (fs/locks.c) that caused write delegation to 
> be granted.
> 
> if ((arg == F_WRLCK)
> 	    && ((atomic_read(&dentry->d_count) > 2)
> 		|| (atomic_read(&inode->i_count) > 2)))
> 		goto out;

Sounds like some more changes are needed to get write delegations
working properly.  To handle this particular problem, maybe
nfsd_commit() needs to have the option of taking a filehandle (as does
nfsd_write() now, for example) so that it doesn't have to do a new open?
I'm not sure.

--b.


More information about the NFSv4 mailing list