diff options
Diffstat (limited to 'xlators')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 2 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 11 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 2 | 
3 files changed, 10 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 75087d54771..c61d18f664d 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -202,7 +202,7 @@ brick_val:                  if (!ret) {                          ret = -1;                          snprintf (err_str, sizeof (err_str), "Brick: %s:%s, %s" -                                  " one of the arguments contain the other", +                                  " one of the bricks contain the other",                                    tmpbrkinfo->hostname, tmpbrkinfo->path, brick);                          goto out;                  } diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index e27d2209f44..d2305df1ee3 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -756,14 +756,19 @@ glusterd_volume_brickinfo_get (uuid_t uuid, char *hostname, char *path,                                  gf_log (THIS->name, GF_LOG_ERROR,                                          "given path %s lies within brick %s",                                          path, brickiter->path); +                                *brickinfo = brickiter; +                                ret = 0; +                                break;                          } else if (path[smaller_path] == '/') {                                  gf_log (THIS->name, GF_LOG_ERROR,                                          "brick %s is a part of %s",                                          brickiter->path, path); +                                *brickinfo = brickiter; +                                ret = 0; +                                break; +                        } else { +                                ret = -1;                          } -                        *brickinfo = brickiter; -                        ret = 0; -                        break;                  }          } diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c index a335a98cdac..6888fd9d5ec 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c @@ -180,7 +180,7 @@ glusterd_handle_create_volume (rpcsvc_request_t *req)                  if (!ret) {                          ret = -1;                          snprintf (err_str, sizeof (err_str), "Brick: %s:%s, %s" -                                  " one of the arguments contain the other", +                                  " one of the bricks contain the other",                                    tmpbrkinfo->hostname, tmpbrkinfo->path, brick);                          goto out;                  }  | 
