diff options
| author | Vijay Bellur <vijay@gluster.com> | 2010-09-24 13:37:32 +0000 | 
|---|---|---|
| committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-24 12:15:44 -0700 | 
| commit | 0b68f788a8ff0579f70e546bcd365ee0c3a49a12 (patch) | |
| tree | 77055910771859c489671e5a642ecd0d10ffba72 /xlators/mgmt/glusterd/src/glusterd-op-sm.c | |
| parent | bd73298410ac6814ed2f45acf2beafee21dc0af1 (diff) | |
mgmt/glusterd: resolve brick before doing uuid comparev3.1.0qa32
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 971 (dynamic volume management)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 14 | 
1 files changed, 14 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 3b6a0201670..2361976819b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -2939,6 +2939,8 @@ glusterd_op_log_filename (gd1_mgmt_stage_op_req *req)          char                  logfile[PATH_MAX]  = {0,};          char                  exp_path[PATH_MAX] = {0,};          struct stat           stbuf              = {0,}; +        char                 *brick_path         = NULL; +          GF_ASSERT (req); @@ -2989,9 +2991,21 @@ glusterd_op_log_filename (gd1_mgmt_stage_op_req *req)                  goto out;          list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) { + +                if (uuid_is_null (brickinfo->uuid)) { +                        ret = glusterd_resolve_brick (brickinfo); +                } +                  if (uuid_compare (brickinfo->uuid, priv->uuid))                          continue; +                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;  | 
