From 5165114025ca5d0ddea8ac6f04bc9d5527e762ef Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Wed, 16 Jan 2013 11:19:52 +0530 Subject: glusterd: log changes in volume create and delete codepath Making log changes involving two commands as they both share sections of code (like the part where the volume metadata is cleaned up in vol delete in case of success; and in vol create in case of failure). * Most of the changes are of the 's/THIS/this' kind. * Changed some of the log messages to give as much information as available in case of failure. * Changed log levels in some of the log messages. Change-Id: I10242511fe9400a07ab04717464d748d9172dd85 BUG: 812356 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/4462 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/mgmt/glusterd/src/glusterd-volgen.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 811ff849428..01dbd8c79f2 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -3191,16 +3191,21 @@ glusterd_is_valid_volfpath (char *volname, char *brick) glusterd_brickinfo_t *brickinfo = NULL; glusterd_volinfo_t *volinfo = NULL; int32_t ret = 0; + xlator_t *this = NULL; + + this = THIS; + GF_ASSERT (this); ret = glusterd_brickinfo_new_from_brick (brick, &brickinfo); if (ret) { - gf_log ("", GF_LOG_WARNING, "brick path validation failed"); + gf_log (this->name, GF_LOG_WARNING, "Failed to create brickinfo" + " for brick %s", brick ); ret = 0; goto out; } ret = glusterd_volinfo_new (&volinfo); if (ret) { - gf_log ("", GF_LOG_WARNING, "brick path validation failed"); + gf_log (this->name, GF_LOG_WARNING, "Failed to create volinfo"); ret = 0; goto out; } -- cgit