* Return the asize which is the psize rounded up to a full group width. * i.e. vdev_draid_psize_to_asize(). */
| 577 | * i.e. vdev_draid_psize_to_asize(). |
| 578 | */ |
| 579 | static uint64_t |
| 580 | vdev_draid_asize(vdev_t *vd, uint64_t psize) |
| 581 | { |
| 582 | vdev_draid_config_t *vdc = vd->vdev_tsd; |
| 583 | uint64_t ashift = vd->vdev_ashift; |
| 584 | |
| 585 | ASSERT3P(vd->vdev_ops, ==, &vdev_draid_ops); |
| 586 | |
| 587 | uint64_t rows = ((psize - 1) / (vdc->vdc_ndata << ashift)) + 1; |
| 588 | uint64_t asize = (rows * vdc->vdc_groupwidth) << ashift; |
| 589 | |
| 590 | ASSERT3U(asize, !=, 0); |
| 591 | ASSERT3U(asize % (vdc->vdc_groupwidth), ==, 0); |
| 592 | |
| 593 | return (asize); |
| 594 | } |
| 595 | |
| 596 | /* |
| 597 | * Deflate the asize to the psize, this includes stripping parity. |
no outgoing calls
no test coverage detected