summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-helpers.h
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-01-05 16:21:52 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2015-02-04 03:53:33 -0800
commit92ab560f73299a1d5faf43a1a90516baa2ba275b (patch)
treed3340584d65067a5dd01a8538ab0d1ee9fd79170 /xlators/cluster/ec/src/ec-helpers.h
parentf397d7edb85c1e4b78c4cac176dc8a0afe8cf9a8 (diff)
cluster/ec: Handle internal xattr get/set
Backport of http://review.gluster.org/9385 Problem: Internal xattrs of EC like trusted.ec.size/config/version can be modified by users and that can lead to misbehavior in EC. Fix: Don't let the user modify the xattrs. Hide these xattrs in getfattr outputs. BUG: 1182490 Change-Id: Ie32ebb95ee67cabbb9488951097a517172b45bcf Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/9455 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-helpers.h')
-rw-r--r--xlators/cluster/ec/src/ec-helpers.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec-helpers.h b/xlators/cluster/ec/src/ec-helpers.h
index 46791041a3f..5f5d9382532 100644
--- a/xlators/cluster/ec/src/ec-helpers.h
+++ b/xlators/cluster/ec/src/ec-helpers.h
@@ -52,4 +52,9 @@ static inline int32_t ec_is_power_of_2(uint32_t value)
return (value != 0) && ((value & (value - 1)) == 0);
}
+gf_boolean_t
+ec_is_internal_xattr (dict_t *dict, char *key, data_t *value, void *data);
+
+void
+ec_filter_internal_xattrs (dict_t *xattr);
#endif /* __EC_HELPERS_H__ */