diff options
author | Xavier Hernandez <xhernandez@datalab.es> | 2014-11-25 09:54:29 +0100 |
---|---|---|
committer | Raghavendra Bhat <raghavendra@redhat.com> | 2014-12-18 04:23:15 -0800 |
commit | ad16db31df793d90a40fbfced82cae1c86d94658 (patch) | |
tree | 2eb1bf8c48d0b563babc46995a1c0de97b173996 /xlators/cluster/ec/src/ec.c | |
parent | 41feb551a3b951a850b169b3d6c4020c89c47afb (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.
This is a backport of http://review.gluster.org/9193/
Change-Id: I75a8345147f344f051923d66be2c10d405370c7b
BUG: 1170959
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/9245
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec.c')
-rw-r--r-- | xlators/cluster/ec/src/ec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c index c702ce3f0fd..c6d3b9fe718 100644 --- a/xlators/cluster/ec/src/ec.c +++ b/xlators/cluster/ec/src/ec.c @@ -23,7 +23,7 @@ * using the rule that redundancy cannot be equal or greater than the number * of fragments. */ -#define EC_MAX_NODES (EC_MAX_FRAGMENTS + ((EC_MAX_FRAGMENTS - 1) / 2)) +#define EC_MAX_NODES min(EC_MAX_FRAGMENTS * 2 - 1, EC_METHOD_MAX_NODES) int32_t ec_parse_options(xlator_t * this) { |