Bug 1291762 - Improve handling of fcntl blocking lock requests
Improve handling of fcntl blocking lock requests
Status: POST
Product: GlusterFS
Classification: Community
Component: locks (Show other bugs)
mainline
All All
medium Severity medium
: ---
: ---
Assigned To: Anoop C S
: Improvement
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-15 09:59 EST by Anoop C S
Modified: 2016-06-13 04:59 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Anoop C S 2015-12-15 09:59:24 EST
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.
Comment 1 Vijay Bellur 2015-12-15 10:02:42 EST
REVIEW: http://review.gluster.org/12974 (features/locks: Handle blocking lock requests properly) posted (#1) for review on master by Anoop C S (anoopcs@redhat.com)
Comment 2 Vijay Bellur 2015-12-17 03:36:27 EST
REVIEW: http://review.gluster.org/12974 (features/locks: Handle blocking lock requests properly) posted (#2) for review on master by Anoop C S (anoopcs@redhat.com)
Comment 3 Vijay Bellur 2015-12-18 01:16:38 EST
REVIEW: http://review.gluster.org/12974 (features/locks: Handle blocking lock requests properly) posted (#3) for review on master by Anoop C S (anoopcs@redhat.com)
Comment 4 Vijay Bellur 2016-02-05 00:47:49 EST
REVIEW: http://review.gluster.org/12974 (features/locks: Handle blocking lock requests properly) posted (#4) for review on master by Anoop C S (anoopcs@redhat.com)
Comment 5 Raghavendra G 2016-02-12 01:09:39 EST
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?
Comment 6 Anoop C S 2016-02-19 00:32:13 EST
Please my replies to the following patch posted upstream:

http://review.gluster.org/#/c/12974/
Comment 7 Mike McCune 2016-03-28 18:15:42 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 8 Vijay Bellur 2016-06-13 04:59:17 EDT
REVIEW: http://review.gluster.org/12974 (features/locks: Handle blocking lock requests properly) posted (#5) for review on master by Anoop C S (anoopcs@redhat.com)

Note You need to log in before you can comment on or make changes to this bug.