* Compute the raidz-deflation ratio. Note, we hard-code * in 128k (1 << 17) because it is the "typical" blocksize. * Even though SPA_MAXBLOCKSIZE changed, this algorithm can not change, * otherwise it would inconsistently account for existing bp's. */
| 1728 | * otherwise it would inconsistently account for existing bp's. |
| 1729 | */ |
| 1730 | static void |
| 1731 | vdev_set_deflate_ratio(vdev_t *vd) |
| 1732 | { |
| 1733 | if (vd == vd->vdev_top && !vd->vdev_ishole && vd->vdev_ashift != 0) { |
| 1734 | vd->vdev_deflate_ratio = (1 << 17) / |
| 1735 | (vdev_psize_to_asize(vd, 1 << 17) >> SPA_MINBLOCKSHIFT); |
| 1736 | } |
| 1737 | } |
| 1738 | |
| 1739 | /* |
| 1740 | * Maximize performance by inflating the configured ashift for top level |
no test coverage detected