Patchwork [BUG:1734] mgmt/glusterd: resolve uuid if null

login
register
Submitter Pranith K
Date 2010-09-29 10:38:34
Message ID <20100929103834.GA2827@dev.gluster.com>
Download mbox | patch
Permalink /patch/5080/
State Accepted
Headers show

Comments

Pranith K - 2010-09-29 10:38:34
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
---
 xlators/mgmt/glusterd/src/glusterd-utils.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Patch

diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 0c1804e..01f5ccd 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -686,6 +686,11 @@  glusterd_brickinfo_get (char *brick, glusterd_volinfo_t *volinfo,
         ret = -1;
         list_for_each_entry (tmp, &volinfo->bricks, brick_list) {
 
+                if (uuid_is_null (tmp->uuid)) {
+                        ret = glusterd_resolve_brick (tmp);
+                        if (ret)
+                                goto out;
+                }
                 if ((!uuid_compare (uuid, tmp->uuid)) &&
                         !strcmp (tmp->path, path)) {
                         gf_log ("", GF_LOG_NORMAL, "Found brick");