From cb1c1d78a3aededcc1d1f77f6e91e23fda83a631 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Sat, 25 Sep 2010 04:40:33 +0000 Subject: mgmt/glusterd: Do not look into brick when logfile is being set for volume Signed-off-by: Vijay Bellur Signed-off-by: Vijay Bellur BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971 --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 2361976819b..e8aa93b4fa4 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -2999,15 +2999,13 @@ glusterd_op_log_filename (gd1_mgmt_stage_op_req *req) if (uuid_compare (brickinfo->uuid, priv->uuid)) continue; - brick_path = strchr (brick, ':'); - brick_path++; + if (brick) { + brick_path = strchr (brick, ':'); + brick_path++; - if (brick_path && strcmp (brickinfo->path, brick_path)) - continue; - - GLUSTERD_REMOVE_SLASH_FROM_PATH (brickinfo->path, exp_path); - if (brick && strcmp (brickinfo->path, brick)) - continue; + if (brick_path && strcmp (brickinfo->path, brick_path)) + continue; + } GLUSTERD_REMOVE_SLASH_FROM_PATH (brickinfo->path, exp_path); -- cgit