summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.h
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2012-02-20 18:42:37 +0530
committerVijay Bellur <vijay@gluster.com>2012-02-20 06:59:11 -0800
commitdb20a0f8a99f715a77366e518720612f043d5c9e (patch)
tree8d0a52e8e8833686e5b9358f3c492a94757c93ea /libglusterfs/src/xlator.h
parentf764516c2e526624ce0088963924ff2d88304553 (diff)
libglusterfs: Implement circular buffer and event history
Implement circular buffer framework, so that it can be used by other components such as event history management. And event history is implemented which can be used by xlator to dump some information to a file (such as information of some structure etc). Through statedump, history of each xlator can be dumped. An option called history should be given to the statedump command. Change-Id: I7c5e8f6bd1018584eaee856e933e7c4b94c6709c BUG: 795419 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/2769 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'libglusterfs/src/xlator.h')
-rw-r--r--libglusterfs/src/xlator.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index c8eff335329..7604f8c21e9 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -29,7 +29,7 @@
#include <stdint.h>
#include <inttypes.h>
-
+#include "event-history.h"
#include "logging.h"
#include "common-utils.h"
#include "dict.h"
@@ -770,6 +770,8 @@ typedef int32_t (*dumpop_inodectx_to_dict_t) (xlator_t *this, inode_t *ino,
typedef int32_t (*dumpop_fdctx_to_dict_t) (xlator_t *this, fd_t *fd,
dict_t *dict);
+typedef int32_t (*dumpop_eh_t) (xlator_t *this);
+
struct xlator_dumpops {
dumpop_priv_t priv;
dumpop_inode_t inode;
@@ -781,6 +783,7 @@ struct xlator_dumpops {
dumpop_fd_to_dict_t fd_to_dict;
dumpop_inodectx_to_dict_t inodectx_to_dict;
dumpop_fdctx_to_dict_t fdctx_to_dict;
+ dumpop_eh_t history;
};
typedef struct xlator_list {
@@ -818,6 +821,7 @@ struct _xlator {
fop_latency_t latencies[GF_FOP_MAXVALUE];
/* Misc */
+ eh_t *history; /* event history context */
glusterfs_ctx_t *ctx;
glusterfs_graph_t *graph; /* not set for fuse */
inode_table_t *itable;