summaryrefslogtreecommitdiffstats
path: root/xlators/storage
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawa@redhat.com>2018-05-30 15:09:29 +0530
committerRaghavendra G <rgowdapp@redhat.com>2018-06-03 03:22:07 +0000
commit2c1131e5868e46cfc806fb3a1cb63a5e554b4d6c (patch)
tree9ae1dc2679a14fb38901262718ae70181f95f30c /xlators/storage
parente3563f6dfda6c3f44ecff52ac22738ff74413ae1 (diff)
dht: Delete MDS internal xattr from dict in dht_getxattr_cbk
Problem: At the time of fetching xattr to heal xattr by afr it is not able to fetch xattr because posix_getxattr has a check to ignore if xattr name is MDS Solution: To ignore same xattr update a check in dht_getxattr_cbk instead of having a check in posix_getxattr BUG: 1584098 Change-Id: I86cd2b2ee08488cb6c12f407694219d57c5361dc fixes: bz#1584098 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
Diffstat (limited to 'xlators/storage')
-rw-r--r--xlators/storage/posix/src/posix-inode-fd-ops.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c
index 4a7385cd271..08916c6d89f 100644
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
@@ -2860,26 +2860,6 @@ out:
return ret;
}
-gf_boolean_t
-posix_is_mds_xattr (const char *name)
-{
- regex_t regcmpl;
- char *key = {"trusted.glusterfs.*.mds$"};
- regmatch_t result[1] = {{0} };
- gf_boolean_t status = _gf_false;
-
- if (regcomp (&regcmpl, key, REG_EXTENDED)) {
- goto out;
- }
- if (!regexec (&regcmpl, name, 1, result, 0)) {
- status = _gf_true;
- goto out;
- }
-out:
- regfree(&regcmpl);
- return status;
-}
-
/**
* posix_getxattr - this function returns a dictionary with all the
@@ -2942,13 +2922,6 @@ posix_getxattr (call_frame_t *frame, xlator_t *this,
goto out;
}
- if (name && posix_is_mds_xattr (name)) {
- op_ret = -1;
- op_errno = ENOATTR;
- goto out;
- }
-
-
if (loc->inode && IA_ISDIR(loc->inode->ia_type) && name &&
ZR_FILE_CONTENT_REQUEST(name)) {
ret = posix_get_file_contents (this, loc->gfid, &name[15],
@@ -3332,10 +3305,6 @@ posix_getxattr (call_frame_t *frame, xlator_t *this,
goto ignore;
}
- if (posix_is_mds_xattr (keybuffer)) {
- goto ignore;
- }
-
memset (value_buf, '\0', XATTR_VAL_BUF_SIZE);
have_val = _gf_false;
size = sys_lgetxattr (real_path, keybuffer, value_buf,