From 519b097548330bf90cc491d1b95ea45e2467e505 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. Backport of http://review.gluster.org/#/c/13299/ > Change-Id: I1e7b229126f7b058642bbc3fb5c109bfd8925325 > BUG: 1302257 > Signed-off-by: Manikandan Selvaganesh Change-Id: I22fbbc30fbc0788a7cf80671c1f3e2a80c9e65e8 BUG: 1306138 Signed-off-by: Manikandan Selvaganesh Reviewed-on: http://review.gluster.org/13418 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Raghavendra G --- xlators/cluster/dht/src/dht-selfheal.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'xlators/cluster/dht/src') diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c index 72d936f55bd..5d034b91720 100644 --- a/xlators/cluster/dht/src/dht-selfheal.c +++ b/xlators/cluster/dht/src/dht-selfheal.c @@ -734,6 +734,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