diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2012-11-14 19:25:14 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-01-17 21:15:13 -0800 |
commit | fd8b19af1713f2800af743d851706b96ca15d9ec (patch) | |
tree | c64194b286718ab320b328b2375901a34eb03b6e /libglusterfs/src/graph.c | |
parent | 165044cee54ceaa8f0adec6d571e9ad54f4f8e5d (diff) |
debug/trace: save the recent fops received in the event-history
* Make use of event-history in debug/trace xlator to dump the recent fops,
when statedump is given. trace xlator saves the fop it received along
with the time in the event-history and upon statedump signal, dumps its
history. The size of the event-history can be given as a xlator option.
* Make changes in trace to take logging into log-file or logging to
history as an option. By default both are off.
Change-Id: I12baee5805c6efb55735cead4e2093fb94d7a6a0
BUG: 797171
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4088
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs/src/graph.c')
-rw-r--r-- | libglusterfs/src/graph.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c index 70b38dc504d..8a84d4cbc16 100644 --- a/libglusterfs/src/graph.c +++ b/libglusterfs/src/graph.c @@ -492,11 +492,14 @@ glusterfs_graph_activate (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx) ctx->active = graph; /* XXX: attach to master and set active pointer */ - if (ctx->master) + if (ctx->master) { ret = xlator_notify (ctx->master, GF_EVENT_GRAPH_NEW, graph); - if (ret) { - gf_log ("graph", GF_LOG_ERROR, "graph new notification failed"); - return ret; + if (ret) { + gf_log ("graph", GF_LOG_ERROR, + "graph new notification failed"); + return ret; + } + ((xlator_t *)ctx->master)->next = graph->top; } /* XXX: perform parent up */ |