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

Function vdev_default_asize

freebsd/contrib/openzfs/module/zfs/vdev.c:258–270  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

256 * all children. This is what's used by anything other than RAID-Z.
257 */
258uint64_t
259vdev_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
272uint64_t
273vdev_default_min_asize(vdev_t *vd)

Callers

nothing calls this directly

Calls 1

vdev_psize_to_asizeFunction · 0.85

Tested by

no test coverage detected