summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorroot <root@localhost.localdomain>2019-04-07 19:31:17 +0530
committerhari gowtham <hari.gowtham005@gmail.com>2019-09-27 11:26:15 +0000
commit356d46b13031be82cc2e0b0eaad7e7fcfccc7c35 (patch)
tree5cd86d75ac2b835a23c33af2996712343289b29c /xlators
parente9fd07ded055387a475a6047a2a4a1947e3d0a16 (diff)
dht: Custom xattrs are not healed in case of add-brick
Problem: If any custom xattrs are set on the directory before add a brick, xattrs are not healed on the directory after adding a brick. Solution: xattr are not healed because dht_selfheal_dir_mkdir_lookup_cbk checks the value of MDS and if MDS value is not negative selfheal code path does not take reference of MDS xattrs.Change the condition to take reference of MDS xattr so that custom xattrs are populated on newly added brick Backport of: > Patch: https://review.gluster.org/22520 > BUG: bz#1702299 > Change-Id: Id14beedb98cce6928055f294e1594b22132e811c > Signed-off-by: Mohit Agrawal <moagrawal@redhat.com> fixes: bz#1753561 Change-Id: Id14beedb98cce6928055f294e1594b22132e811c Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index 5420fcad071..f5dfff9a11f 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -1310,12 +1310,8 @@ dht_selfheal_dir_mkdir_lookup_cbk(call_frame_t *frame, void *cookie,
int this_call_cnt = 0;
int missing_dirs = 0;
dht_layout_t *layout = NULL;
- dht_conf_t *conf = 0;
xlator_t *prev = 0;
loc_t *loc = NULL;
- int check_mds = 0;
- int errst = 0;
- int32_t mds_xattr_val[1] = {0};
char gfid_local[GF_UUID_BUF_SIZE] = {0};
int index = -1;
@@ -1324,7 +1320,6 @@ dht_selfheal_dir_mkdir_lookup_cbk(call_frame_t *frame, void *cookie,
local = frame->local;
layout = local->layout;
loc = &local->loc;
- conf = this->private;
prev = cookie;
if (!gf_uuid_is_null(local->gfid))
@@ -1347,9 +1342,7 @@ dht_selfheal_dir_mkdir_lookup_cbk(call_frame_t *frame, void *cookie,
if (!op_ret) {
dht_iatt_merge(this, &local->stbuf, stbuf);
- check_mds = dht_dict_get_array(xattr, conf->mds_xattr_key,
- mds_xattr_val, 1, &errst);
- if (dict_get(xattr, conf->mds_xattr_key) && check_mds && !errst) {
+ if (prev == local->mds_subvol) {
dict_unref(local->xattr);
local->xattr = dict_ref(xattr);
}