diff options
author | Manikandan Selvaganesh <mselvaga@redhat.com> | 2016-01-27 14:56:33 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2016-02-10 21:22:26 -0800 |
commit | 519b097548330bf90cc491d1b95ea45e2467e505 (patch) | |
tree | 3fdc88f00f5dc99cb1a87dad2e205b22d0764d84 /xlators/cluster/dht/src | |
parent | cf3003a6efab31a37a2bd65f16e4babf365b0814 (diff) |
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.<suffix>" 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 <mselvaga@redhat.com>
Change-Id: I22fbbc30fbc0788a7cf80671c1f3e2a80c9e65e8
BUG: 1306138
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-on: http://review.gluster.org/13418
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r-- | xlators/cluster/dht/src/dht-selfheal.c | 11 |
1 files changed, 11 insertions, 0 deletions
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)) |