Fix validation logic for `d` in CLAY erasure code profiles
Updated validation to ensure `d` satisfies `k + 1 <= d <= k + m - 1`.
This change aligns the implementation with the documented constraints
for CLAY erasure code profiles, ensuring consistent behavior and avoiding
undefined scenarios.
Fixes: https://tracker.ceph.com/issues/69506
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
}
}
}
- if ((d < k) || (d > k + m - 1)) {
+ if ((d < k + 1) || (d > k + m - 1)) {
*ss << "value of d " << d
- << " must be within [ " << k << "," << k+m-1 << "]" << std::endl;
+ << " must be within [" << k + 1 << "," << k + m - 1 << "]" << std::endl;
err = -EINVAL;
return err;
}