diff options
author | Xavier Hernandez <xhernandez@datalab.es> | 2016-06-15 14:42:19 +0200 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2018-01-16 10:37:22 +0000 |
commit | 7ba7a4b27d124f4ee16fe4776a4670cd5b0160c4 (patch) | |
tree | 73cca7226576b7ce3e480dc991aa70b9cc7cab07 /libglusterfs | |
parent | 3e9a9c029fac359477fb26d9cc7803749ba038b2 (diff) |
locks: added inodelk/entrylk contention upcall notifications
The locks xlator now is able to send a contention notification to
the current owner of the lock.
This is only a notification that can be used to improve performance
of some client side operations that might benefit from extended
duration of lock ownership. Nothing is done if the lock owner decides
to ignore the message and to not release the lock. For forced
release of acquired resources, leases must be used.
Change-Id: I7f1ad32a0b4b445505b09908a050080ad848f8e0
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/upcall-utils.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libglusterfs/src/upcall-utils.h b/libglusterfs/src/upcall-utils.h index 3b5dce33e45..48d10382c10 100644 --- a/libglusterfs/src/upcall-utils.h +++ b/libglusterfs/src/upcall-utils.h @@ -63,6 +63,8 @@ typedef enum { GF_UPCALL_EVENT_NULL, GF_UPCALL_CACHE_INVALIDATION, GF_UPCALL_RECALL_LEASE, + GF_UPCALL_INODELK_CONTENTION, + GF_UPCALL_ENTRYLK_CONTENTION, } gf_upcall_event_t; struct gf_upcall { @@ -88,4 +90,19 @@ struct gf_upcall_recall_lease { dict_t *dict; }; +struct gf_upcall_inodelk_contention { + struct gf_flock flock; + pid_t pid; + const char *domain; + dict_t *xdata; +}; + +struct gf_upcall_entrylk_contention { + uint32_t type; + pid_t pid; + const char *name; + const char *domain; + dict_t *xdata; +}; + #endif /* _UPCALL_UTILS_H */ |