diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2016-01-19 10:45:22 +0530 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2016-02-29 03:55:23 -0800 |
commit | a60c39de31e8258cb56d8db6bd8ec2491a942a4e (patch) | |
tree | e8823b94d7f9b91a52e3bfefd4af64461e68d0db /xlators/mgmt/glusterd/src/glusterd.h | |
parent | 1f673d141fb06282583175357348a7a2fc19e604 (diff) |
glusterd: use string comparison for realpath checks in glusterd_is_brickpath_available
glusterd_is_brickpath_available () used to call realpath() for checking the
whether the new brick path matches with the existing ones. The problem with this
is if the underlying file system is bad for any one of the existing bricks then
realpath() would fail and we wouldn't allow to create the new brick even if it
should be allowed.
Fix is to use string comparison with having a new field real_path in brickinfo
to store the absolute path
Change-Id: I1250ea5345f00fca0f6128056ebd08750d604f0a
BUG: 1299710
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/13258
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index 34de8801385..34e3e19d32c 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -189,6 +189,7 @@ typedef enum gf_brick_status { struct glusterd_brickinfo { char hostname[1024]; char path[PATH_MAX]; + char real_path[PATH_MAX]; char device_path[PATH_MAX]; char mount_dir[PATH_MAX]; char brick_id[1024];/*Client xlator name, AFR changelog name*/ |