+ unsigned long m = fc->fcp->max_slice_bytes - FEC_HEADER_SIZE;
+ unsigned rv, redundant_slices = fc->fcp->slices_per_group
+ - fc->fcp->data_slices_per_group;
+
+ if (!m)
+ return -E_BAD_CT;
+ rv = (bytes + m - 1) / m;
+ if (rv + redundant_slices > 255)
+ return -E_BAD_CT;
+ *result = rv;
+ return 1;