MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vdev_draid_get_perm

Function vdev_draid_get_perm

freebsd/contrib/openzfs/module/zfs/vdev_draid.c:557–566  ·  view source on GitHub ↗

* Lookup the permutation array and iteration id for the provided offset. */

Source from the content-addressed store, hash-verified

555 * Lookup the permutation array and iteration id for the provided offset.
556 */
557static void
558vdev_draid_get_perm(vdev_draid_config_t *vdc, uint64_t pindex,
559 uint8_t **base, uint64_t *iter)
560{
561 uint64_t ncols = vdc->vdc_children;
562 uint64_t poff = pindex % (vdc->vdc_nperms * ncols);
563
564 *base = vdc->vdc_perms + (poff / ncols) * ncols;
565 *iter = poff % ncols;
566}
567
568static inline uint64_t
569vdev_draid_permute_id(vdev_draid_config_t *vdc,

Callers 5

vdev_draid_map_alloc_rowFunction · 0.85
vdev_draid_group_missingFunction · 0.85
vdev_draid_xlateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected