Changes from commit 79db3aced2ffca84a696192343d5b811833eb671 were done in an attempt to avoid lock upgrade/downgrade problems for a conflicting F_SETLKW lock request as explained below. Consider the following sequence of events acting upon a file: 1. App1 requests shared blocking byte range lock request from offset 0 to 5 and is granted. 2. App2 requests shared blokcing byte range lock request from offset 0 to 5 and is granted. 3. App1 requests exclusive blocking byte range lock request from offset 0 to 5 and is blocked. Before the specified commit hash eventhough App2 releases its lock, App1's blocked lock request could not be granted due to lack of lock owner and related checks inside first_overlap() which is invoked from grant_blocked_locks() as soon as the release happens from App2. This undefined wait/hang was fixed via the commit in such a way that we unlock App1's previously held lock as soon as we receive a blocking lock request from App1 which conflicts with App2's lock. This would mean that we break the promise of granted shared lock given to App1 temporarily. pl_send_prelock_unlock() implements this early unlock.
REVIEW: http://review.gluster.org/12974 (features/locks: Handle blocking lock requests properly) posted (#1) for review on master by Anoop C S (anoopcs)
REVIEW: http://review.gluster.org/12974 (features/locks: Handle blocking lock requests properly) posted (#2) for review on master by Anoop C S (anoopcs)
REVIEW: http://review.gluster.org/12974 (features/locks: Handle blocking lock requests properly) posted (#3) for review on master by Anoop C S (anoopcs)
REVIEW: http://review.gluster.org/12974 (features/locks: Handle blocking lock requests properly) posted (#4) for review on master by Anoop C S (anoopcs)
There are some test scripts at: https://bugzilla.redhat.com/show_bug.cgi?id=GLUSTER-1017 Can you check whether this patch passes all those tests?
Please my replies to the following patch posted upstream: http://review.gluster.org/#/c/12974/
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions
REVIEW: http://review.gluster.org/12974 (features/locks: Handle blocking lock requests properly) posted (#5) for review on master by Anoop C S (anoopcs)
This update is done in bulk based on the state of the patch and the time since last activity. If the issue is still seen, please reopen the bug.