summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/graph.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-03-16 09:38:49 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-03-17 23:11:04 -0700
commit0a1f00cdcb087e00c184c62c1a9f22803c257cf2 (patch)
tree85b3ae636ec6084ec46a883ca7e090575eb60fba /libglusterfs/src/graph.c
parent0f39192ef6bc7b1c74cfaeb04ed21305996d67e9 (diff)
libglusterfs/src/*.c: log enhancement
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
Diffstat (limited to 'libglusterfs/src/graph.c')
-rw-r--r--libglusterfs/src/graph.c33
1 files changed, 24 insertions, 9 deletions
diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c
index fb829d48441..5538df04d6d 100644
--- a/libglusterfs/src/graph.c
+++ b/libglusterfs/src/graph.c
@@ -446,18 +446,24 @@ glusterfs_graph_prepare (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx)
/* XXX: attach to -n volname */
ret = glusterfs_graph_settop (graph, ctx);
- if (ret)
+ if (ret) {
+ gf_log ("graph", GF_LOG_ERROR, "glusterfs graph settop failed");
return -1;
+ }
/* XXX: RO VOLUME */
ret = glusterfs_graph_readonly (graph, ctx);
- if (ret)
+ if (ret) {
+ gf_log ("graph", GF_LOG_ERROR, "glusterfs graph readonly failed");
return -1;
+ }
/* XXX: MAC COMPAT */
ret = glusterfs_graph_mac_compat (graph, ctx);
- if (ret)
+ if (ret) {
+ gf_log ("graph", GF_LOG_ERROR, "glusterfs graph mac compat failed");
return -1;
+ }
/* XXX: this->ctx setting */
for (trav = graph->first; trav; trav = trav->next) {
@@ -484,17 +490,23 @@ glusterfs_graph_activate (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx)
/* XXX: all xlator options validation */
ret = glusterfs_graph_validate_options (graph);
- if (ret)
+ if (ret) {
+ gf_log ("graph", GF_LOG_ERROR, "validate options failed");
return ret;
+ }
/* XXX: perform init () */
ret = glusterfs_graph_init (graph);
- if (ret)
+ if (ret) {
+ gf_log ("graph", GF_LOG_ERROR, "init failed");
return ret;
+ }
ret = glusterfs_graph_unknown_options (graph);
- if (ret)
+ if (ret) {
+ gf_log ("graph", GF_LOG_ERROR, "unknown options failed");
return ret;
+ }
/* XXX: log full graph (_gf_dump_details) */
@@ -504,14 +516,17 @@ glusterfs_graph_activate (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx)
/* XXX: attach to master and set active pointer */
if (ctx->master)
ret = xlator_notify (ctx->master, GF_EVENT_GRAPH_NEW, graph);
- if (ret)
+ if (ret) {
+ gf_log ("graph", GF_LOG_ERROR, "graph new notification failed");
return ret;
+ }
/* XXX: perform parent up */
ret = glusterfs_graph_parent_up (graph);
- if (ret)
+ if (ret) {
+ gf_log ("graph", GF_LOG_ERROR, "parent up notification failed");
return ret;
-
+ }
return 0;
}