1 Mar 2007 01:51
Re: NFS client fcntl locks going missing on FC6
M A Young <m.a.young <at> durham.ac.uk>
2007-03-01 00:51:27 GMT
2007-03-01 00:51:27 GMT
I have found out what was causing the bug I was seeing. The do_setlk function of fs/nfs/file.c creates a local lock if the remote lock attempt was blocked and then interrupted, supposedly so that the remote lock is removed when the process exits. Unfortunately by this stage the lock has forgotten how to do this, and if the process tries again for the same remote lock and succeeds in getting it, the system reuses the existing local only lock rather than creating a new one, which means that there is apparently nothing using the owner records storing the (new) svid, and this is information is discarded. As a result, when the file is unlocked, there is no record of the svid that was used, so the unlock attempt uses a new svid which of course fails, and the file is never unlocked. I have attached a patch to the RedHat bugzilla bug (229469) https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=148974 which under limited testing fixes the problem I was seeing by not creating the local lock if it has no hope of removing any possible remote one, though I suspect more thought could yield a better patch. Michael Young ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ NFS maillist - NFS <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs



RSS Feed