summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-method.h
diff options
context:
space:
mode:
authorXavier Hernandez <xhernandez@datalab.es>2014-11-25 09:54:29 +0100
committerVijay Bellur <vbellur@redhat.com>2014-12-04 11:35:19 -0800
commitca2a3949715fb25862d1e34f9e65283287faa842 (patch)
tree9e54be49bc0c6a363aaf475b3b14b34966407715 /xlators/cluster/ec/src/ec-method.h
parentbc91dd4de39ffd481a52b837f322f6782c14e9f1 (diff)
ec: Fix incorrect value of EC_MAX_NODES
EC_MAX_NODES was incorrectly calculated. Now the value if computed as the minimum between the theoretical maximum and the limit imposed by the Galois Field. Change-Id: I75a8345147f344f051923d66be2c10d405370c7b BUG: 1167419 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/9193 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-method.h')
-rw-r--r--xlators/cluster/ec/src/ec-method.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec-method.h b/xlators/cluster/ec/src/ec-method.h
index 085de8f4b17..29b46e10443 100644
--- a/xlators/cluster/ec/src/ec-method.h
+++ b/xlators/cluster/ec/src/ec-method.h
@@ -13,7 +13,10 @@
#include "ec-gf.h"
+/* Determines the maximum size of the matrix used to encode/decode data */
#define EC_METHOD_MAX_FRAGMENTS 16
+/* Determines the maximum number of usable elements in the Galois Field */
+#define EC_METHOD_MAX_NODES (EC_GF_SIZE - 1)
#define EC_METHOD_WORD_SIZE 64