* Default asize function: return the MAX of psize with the asize of * all children. This is what's used by anything other than RAID-Z. */
| 256 | * all children. This is what's used by anything other than RAID-Z. |
| 257 | */ |
| 258 | uint64_t |
| 259 | vdev_default_asize(vdev_t *vd, uint64_t psize) |
| 260 | { |
| 261 | uint64_t asize = P2ROUNDUP(psize, 1ULL << vd->vdev_top->vdev_ashift); |
| 262 | uint64_t csize; |
| 263 | |
| 264 | for (int c = 0; c < vd->vdev_children; c++) { |
| 265 | csize = vdev_psize_to_asize(vd->vdev_child[c], psize); |
| 266 | asize = MAX(asize, csize); |
| 267 | } |
| 268 | |
| 269 | return (asize); |
| 270 | } |
| 271 | |
| 272 | uint64_t |
| 273 | vdev_default_min_asize(vdev_t *vd) |
nothing calls this directly
no test coverage detected