From 41120aa8bab4ca4496bb37b8986434be404ae255 Mon Sep 17 00:00:00 2001 From: Xavier Hernandez Date: Wed, 13 Dec 2017 17:27:42 +0100 Subject: cluster/ec: Fix possible shift overflow A coverity scan has revelaed a potential shift overflow while scanning the bitmap of available subvolumes. The actual overflow cannot happen, but I've changed to test used to control the limit to make it explicit. Change-Id: Ieb55f010bbca68a1d86a93e47822f7c709a26e83 BUG: 789278 Signed-off-by: Xavier Hernandez --- xlators/cluster/ec/src/ec.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'xlators/cluster/ec/src/ec.c') diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c index c8beb2b56fc..4c80f1283f1 100644 --- a/xlators/cluster/ec/src/ec.c +++ b/xlators/cluster/ec/src/ec.c @@ -31,13 +31,6 @@ static char *ec_read_policies[EC_READ_POLICY_MAX + 1] = { [EC_READ_POLICY_MAX] = NULL }; -#define EC_MAX_FRAGMENTS EC_METHOD_MAX_FRAGMENTS -/* The maximum number of nodes is derived from the maximum allowed fragments - * using the rule that redundancy cannot be equal or greater than the number - * of fragments. - */ -#define EC_MAX_NODES min(EC_MAX_FRAGMENTS * 2 - 1, EC_METHOD_MAX_NODES) - #define EC_INTERNAL_XATTR_OR_GOTO(name, xattr, op_errno, label) \ do { \ if (ec_is_internal_xattr (NULL, (char *)name, NULL, NULL)) { \ -- cgit