summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src/locks.h
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2016-04-17 10:17:42 +0530
committerNiels de Vos <ndevos@redhat.com>2016-05-01 18:04:36 -0700
commit90a8d15ea9778b5089521767137b14cb52b9a2b3 (patch)
tree3f9d562aefbc67ac3973c15ca60279bd3c055803 /xlators/features/locks/src/locks.h
parent2cca000fcc2adbffbb3f5258c57ae564b9e2d51f (diff)
posix/lock: add getactivelk () fop
Change-Id: I99e41a80854d6f90572df755e14757099ae1236f BUG: 1326085 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/13995 Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/features/locks/src/locks.h')
-rw-r--r--xlators/features/locks/src/locks.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/features/locks/src/locks.h b/xlators/features/locks/src/locks.h
index df42cf5..3480027 100644
--- a/xlators/features/locks/src/locks.h
+++ b/xlators/features/locks/src/locks.h
@@ -42,6 +42,16 @@ struct __posix_lock {
across nodes */
void *client; /* to identify client node */
+
+ /* This field uniquely identifies the client the lock belongs to. As
+ * lock migration is handled by rebalance, the client_t object will be
+ * overwritten by rebalance and can't be deemed as the owner of the
+ * lock on destination. Hence, the below field is migrated from
+ * source to destination by lock_migration_info_t and updated on the
+ * destination. So that on client-server disconnection, server can
+ * cleanup the locks proper;y. */
+
+ char *client_uid;
gf_lkowner_t owner;
pid_t client_pid; /* pid of client process */
};
@@ -145,6 +155,7 @@ struct __pl_inode {
inode_t *inode; /* pointer to be used for ref and unref
of inode_t as long as there are
locks on it */
+ gf_boolean_t migrated;
};
typedef struct __pl_inode pl_inode_t;