From c4efd39d339535856c1a0a6b0fad2783587411c9 Mon Sep 17 00:00:00 2001 From: Susant Palai Date: Sun, 17 Apr 2016 10:14:02 +0530 Subject: core: add getactivelk () fop Change-Id: Ifd0ff278dcf43da064021f5c25e5dcd34347fcde BUG: 1326085 Signed-off-by: Susant Palai Reviewed-on: http://review.gluster.org/13970 Smoke: Gluster Build System Reviewed-by: Niels de Vos NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- libglusterfs/src/common-utils.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'libglusterfs/src/common-utils.c') diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index a1a4c7d43ae..49b76871bab 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -4212,6 +4212,25 @@ out: return ret; } +void +gf_free_mig_locks (lock_migration_info_t *locks) +{ + lock_migration_info_t *current = NULL; + lock_migration_info_t *temp = NULL; + + if (!locks) + return; + + if (list_empty (&locks->list)) + return; + + list_for_each_entry_safe (current, temp, &locks->list, list) { + list_del_init (¤t->list); + GF_FREE (current->client_uid); + GF_FREE (current); + } +} + void _mask_cancellation (void) { @@ -4287,6 +4306,7 @@ fop_enum_to_pri_string (glusterfs_fop_t fop) case GF_FOP_STATFS: case GF_FOP_READDIR: case GF_FOP_READDIRP: + case GF_FOP_GETACTIVELK: return "HIGH"; case GF_FOP_CREATE: -- cgit