summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/compound-fop-utils.h
diff options
context:
space:
mode:
authorAnuradha Talur <atalur@redhat.com>2016-08-29 16:41:09 +0530
committerRaghavendra G <rgowdapp@redhat.com>2016-08-30 23:50:40 -0700
commit7cbc10037ecc873d60c3a970d00faf2819019525 (patch)
tree35026d258fa4bb9aad89f7a504954bb566ffa4fc /libglusterfs/src/compound-fop-utils.h
parentfe929224c47d5c82da5650e9e1041645a8d7f244 (diff)
compound fops: Some fixes to compound fops framework
Change-Id: I808fd5f9f002a35bff94d310c5d61a781e49570b BUG: 1360169 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/15010 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'libglusterfs/src/compound-fop-utils.h')
-rw-r--r--libglusterfs/src/compound-fop-utils.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/libglusterfs/src/compound-fop-utils.h b/libglusterfs/src/compound-fop-utils.h
new file mode 100644
index 00000000000..bfd0649aef2
--- /dev/null
+++ b/libglusterfs/src/compound-fop-utils.h
@@ -0,0 +1,35 @@
+/*
+ Copyright (c) 2016 Red Hat, Inc. <http://www.redhat.com>
+ This file is part of GlusterFS.
+
+ This file is licensed to you under your choice of the GNU Lesser
+ General Public License, version 3 or any later version (LGPLv3 or
+ later), or the GNU General Public License, version 2 (GPLv2), in all
+ cases as published by the Free Software Foundation.
+*/
+
+#ifndef __COMPOUND_FOP_UTILS_H__
+#define __COMPOUND_FOP_UTILS_H__
+
+#include "defaults.h"
+#include "default-args.h"
+#include "mem-types.h"
+#include "dict.h"
+
+#define COMPOUND_PACK_ARGS(fop, fop_enum, args, counter, params ...) do { \
+ args->enum_list[counter] = fop_enum; \
+ args_##fop##_store (&args->req_list[counter], params); \
+} while (0)
+
+compound_args_t*
+compound_fop_alloc (int length, glusterfs_compound_fop_t fop, dict_t *xdata);
+
+void
+compound_args_cleanup (compound_args_t *args);
+
+void
+compound_args_cbk_cleanup (compound_args_cbk_t *args_cbk);
+
+compound_args_cbk_t*
+compound_args_cbk_alloc (int length, dict_t *xdata);
+#endif /* __COMPOUND_FOP_UTILS_H__ */