Red Hat Bugzilla – Bug 822384
nlm:ulock does not happen after the server is back
Last modified: 2016-02-17 19:03:16 EST
Description of problem:
this issue happens when the script is sent for sleep and
nfs server is restarted after the script holding the lock comes of sleep
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create a dist-rep(2x2) volume
2. nfs mount the volume
3. now try to put lock on a file and put the script on sleep for some time.
4. meanwhile kill the gnfs process.
5. when the script is out the sleep , start the gnfs again.
the unlock of the volume fails, with these messages.
returns:- nlm_get_uniq() returned NULL and unable to unlock_fd_resume
this unlock should happen
the unlock happens when nfs is killed and restarted during the sleep period itself.
during nfs server restart, if nfs server is started after unlock() call, the nfs client does not send a reclaim lock request when it gets SM_NOTIFY before sending the unlock request. And hence the server is unable to find any info related to the unlock call and returns error. nfs server should return success for unlock call if it is not able to find any locks held whenever there is an unlock request. (this is how kernel nfs server behaves)
Commit 04f6cd78fab5a2fa8a02da3be27b080a15aec203 fixes the issue.