summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src/locks.h
diff options
context:
space:
mode:
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 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;