From 90a8d15ea9778b5089521767137b14cb52b9a2b3 Mon Sep 17 00:00:00 2001 From: Susant Palai Date: Sun, 17 Apr 2016 10:17:42 +0530 Subject: posix/lock: add getactivelk () fop Change-Id: I99e41a80854d6f90572df755e14757099ae1236f BUG: 1326085 Signed-off-by: Susant Palai Reviewed-on: http://review.gluster.org/13995 Reviewed-by: Niels de Vos Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- xlators/features/locks/src/locks.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'xlators/features/locks/src/locks.h') diff --git a/xlators/features/locks/src/locks.h b/xlators/features/locks/src/locks.h index df42cf560fd..3480027c4c9 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; -- cgit