summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/syncop.c
diff options
context:
space:
mode:
authorAnoop C S <anoopcs@redhat.com>2016-05-03 17:02:17 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-05-20 04:23:19 -0700
commitdeaf8439fc42435988aae6a7b9ab681cc0d36b09 (patch)
treee76a9b92f9d188308677167e95f5d34a6f6ed71c /libglusterfs/src/syncop.c
parent6a51464cf4704e7d7fcbce8919a5ef386a9cfd53 (diff)
downloadglusterfs-deaf8439fc42435988aae6a7b9ab681cc0d36b09.tar.gz
glusterfs-deaf8439fc42435988aae6a7b9ab681cc0d36b09.tar.xz
glusterfs-deaf8439fc42435988aae6a7b9ab681cc0d36b09.zip
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@redhat.com> Reviewed-on: http://review.gluster.org/14189 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Susant Palai <spalai@redhat.com> Reviewed-by: Poornima G <pgurusid@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'libglusterfs/src/syncop.c')
-rw-r--r--libglusterfs/src/syncop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c
index e3d48577d2..00a9b57626 100644
--- a/libglusterfs/src/syncop.c
+++ b/libglusterfs/src/syncop.c
@@ -3101,6 +3101,8 @@ syncop_getactivelk_cbk (call_frame_t *frame,
entry->flock = tmp->flock;
+ entry->lk_flags = tmp->lk_flags;
+
entry->client_uid = gf_strdup (tmp->client_uid);
list_add_tail (&entry->list, &args->locklist.list);