From acfb402414ec4a9ab8c9f9d4fead6b9141c2e934 Mon Sep 17 00:00:00 2001 From: Manikandan Selvaganesh Date: Wed, 27 Jan 2016 14:56:33 +0530 Subject: dht/quota : heal the limit_objects_key xattr needed for inode-quota Whenever a new brick is added, quota related xattr's should be healed but currently, the xattr "quota.limit-objects." needed for inode-quota is not being healed. The patch fixes this issue. Change-Id: I1e7b229126f7b058642bbc3fb5c109bfd8925325 BUG: 1302257 Signed-off-by: Manikandan Selvaganesh Reviewed-on: http://review.gluster.org/13299 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Vijaikumar Mallikarjuna Reviewed-by: Raghavendra G --- xlators/cluster/dht/src/dht-selfheal.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c index 27b5d439add..d7ee74224c6 100644 --- a/xlators/cluster/dht/src/dht-selfheal.c +++ b/xlators/cluster/dht/src/dht-selfheal.c @@ -730,6 +730,17 @@ dht_selfheal_dir_xattr_persubvol (call_frame_t *frame, loc_t *loc, loc->path, QUOTA_LIMIT_KEY); } } + data = dict_get (local->xattr, QUOTA_LIMIT_OBJECTS_KEY); + if (data) { + ret = dict_add (xattr, QUOTA_LIMIT_OBJECTS_KEY, data); + if (ret) { + gf_msg (this->name, GF_LOG_ERROR, 0, + DHT_MSG_DICT_SET_FAILED, + "%s: Failed to set dictionary value:" + " key = %s", + loc->path, QUOTA_LIMIT_OBJECTS_KEY); + } + } } if (!gf_uuid_is_null (local->gfid)) -- cgit