Bug 1332501

Summary: Mandatory locks are not migrated during lock migration
Product: [Community] GlusterFS Reporter: Anoop C S <anoopcs>
Component: locksAssignee: Anoop C S <anoopcs>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: mainlineCC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1337805 (view as bug list) Environment:
Last Closed: 2016-05-28 05:50:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1337805    

Description Anoop C S 2016-05-03 10:55:01 UTC
Description of problem:

Mandatory locks are differentiated from traditional advisory POSIX locks based on new structure member named 'lk_flags' within posix_lock_t structure. But during lock migration getactivelk() inside locks translator does not read lk_flags from this structure and hence this differentiation is lost on the destination brick after migration.

Version-Release number of selected component (if applicable):

mainline

Comment 1 Vijay Bellur 2016-05-03 12:54:57 UTC
REVIEW: http://review.gluster.org/14189 (core: Honour mandatory lock flags during lock migration) posted (#1) for review on master by Anoop C S (anoopcs)

Comment 2 Vijay Bellur 2016-05-04 07:13:57 UTC
REVIEW: http://review.gluster.org/14189 (core: Honour mandatory lock flags during lock migration) posted (#2) for review on master by Anoop C S (anoopcs)

Comment 3 Vijay Bellur 2016-05-20 11:23:23 UTC
COMMIT: http://review.gluster.org/14189 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit deaf8439fc42435988aae6a7b9ab681cc0d36b09
Author: Anoop C S <anoopcs>
Date:   Tue May 3 17:02:17 2016 +0530

    core: Honour mandatory lock flags during lock migration
    
    lk_flags from posix_lock_t structure is the primary key used to
    differentiate locks as either advisory and mandatory type. During
    lock migration this field is not read in getactivelk() call path.
    So in order to copy the exact lock state from source to destination
    it is necessary to include lk_flags within lock_migration_info_t
    structure to maintain accurate state. This change also includes
    minor modifications to setactivelk() call to consider lk_flags
    during lock migration.
    
    Change-Id: I20a7b6b6a0f3bdac5734cce8a2cd2349eceff195
    BUG: 1332501
    Signed-off-by: Anoop C S <anoopcs>
    Reviewed-on: http://review.gluster.org/14189
    Smoke: Gluster Build System <jenkins.com>
    Reviewed-by: Susant Palai <spalai>
    Reviewed-by: Poornima G <pgurusid>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>