cluster/afr: Change Self-heal domain separator to ':'

'-' can be present in a volume. This may lead to domain
collisions in future.

Tests:
Checked in gdb that domain comes with ':' separator:

Breakpoint 1, pl_common_inodelk (frame=0x7fdabcce51a4,
this=0x8bde20, volume=0x8b50d0 "r2-replicate-0:self-heal",
inode=0x7fdab822f0e8, cmd=6, flock=0x7fdabc76eee4,
loc=0x7fdabc76ede4, fd=0x0, xdata=0x7fdabc6e0ab0) at inodelk.c:597

Change-Id: I4456ae35ac8bf21e6361c34e9ad437f744a2e84b
BUG: 993981
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/6025
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
This commit is contained in:
Pranith Kumar K 2013-10-03 10:28:47 +05:30 committed by Anand Avati
parent 79ba7b3e2e
commit c32db94e29
2 changed files with 3 additions and 1 deletions

View File

@ -388,7 +388,8 @@ init (xlator_t *this)
i++;
}
ret = gf_asprintf (&priv->sh_domain, "%s-self-heal", this->name);
ret = gf_asprintf (&priv->sh_domain, AFR_SH_DATA_DOMAIN_FMT,
this->name);
if (-1 == ret) {
ret = -ENOMEM;
goto out;

View File

@ -28,6 +28,7 @@
#define AFR_XATTR_PREFIX "trusted.afr"
#define AFR_PATHINFO_HEADER "REPLICATE:"
#define AFR_SH_READDIR_SIZE_KEY "self-heal-readdir-size"
#define AFR_SH_DATA_DOMAIN_FMT "%s:self-heal"
#define AFR_LOCKEE_COUNT_MAX 3
#define AFR_DOM_COUNT_MAX 3