summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/default-args.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/default-args.c')
-rw-r--r--libglusterfs/src/default-args.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/libglusterfs/src/default-args.c b/libglusterfs/src/default-args.c
index 1ce907f6221..ca24c2fe08c 100644
--- a/libglusterfs/src/default-args.c
+++ b/libglusterfs/src/default-args.c
@@ -1431,6 +1431,47 @@ args_seek_cbk_store (default_args_cbk_t *args, int32_t op_ret,
return 0;
}
+int
+args_getactivelk_cbk_store (default_args_cbk_t *args,
+ int32_t op_ret, int32_t op_errno,
+ lock_migration_info_t *locklist, dict_t *xdata)
+{
+ lock_migration_info_t *stub_entry = NULL, *entry = NULL;
+ int ret = 0;
+
+ args->op_ret = op_ret;
+ args->op_errno = op_errno;
+ /*op_ret needs to carry the number of locks present in the list*/
+ if (op_ret > 0) {
+ list_for_each_entry (entry, &locklist->list, list) {
+ stub_entry = GF_CALLOC (1, sizeof (*stub_entry),
+ gf_common_mt_char);
+ if (!stub_entry) {
+ ret = -1;
+ goto out;
+ }
+
+ INIT_LIST_HEAD (&stub_entry->list);
+ stub_entry->flock = entry->flock;
+
+ stub_entry->client_uid = gf_strdup (entry->client_uid);
+ if (!stub_entry->client_uid) {
+ GF_FREE (stub_entry);
+ ret = -1;
+ goto out;
+ }
+
+ list_add_tail (&stub_entry->list,
+ &args->locklist.list);
+ }
+ }
+
+ if (xdata)
+ args->xdata = dict_ref (xdata);
+out:
+ return ret;
+}
+
void
args_lease_store (default_args_t *args, loc_t *loc, struct gf_lease *lease,
dict_t *xdata)