Delay in WRITE delegation recall during COMMIT

Ajay Gulati gulati at cs.rice.edu
Thu Aug 17 16:38:22 EDT 2006


Hi All,
I am testing write delegations on nfsv4 and it seems that there is some 
sort of loop between COMMIT and DELEGRETURN, that causes commit to take 90 
seconds on closing of a file.
The scenario to duplicate is as follows:

f1 = open(file1, RDONLY)
close(f1)
f2 = open(file2, RDWR)	// you will get write delegation
write(f2, 75KB data)
f3= open(file2,RDWR)
close(f2)
close(f3)

Here the close takes 90 seconds to finish. tcpdump shows that 
commit fails 4-5 times with NFS4ERR_DELAY, delegation 
is being recalled as part of nfsd_commit()->nfsd_open()->breaklease() 
execution path. The server ultimately times out on delegation recall.

I think, the client is waiting for commit to succeed for returning 
delegation and the server is doing the recall as part of commit. I am not 
quite sure why this is taking so long, when delegation recall is spawned 
as a separate thread.

Same problem happens if some other client opens the file2 with RDWR 
permissions. The open(file2,RDWR) from other client takes 90 sec to 
return.

I can post exact program and tcpdump if needed. It should be fairly easy 
to reproduce though.
I am using kernel: 2.6.17-rc6 and CITI patch for that kernel.

If you have seen this before or know the reason why this is happening, 
please let me know.

Thanks
Ajay


More information about the NFSv4 mailing list