]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use a helper function to clarify gang block size
authorMatthew Ahrens <matthew.ahrens@delphix.com>
Fri, 26 Mar 2021 18:19:35 +0000 (11:19 -0700)
committerGitHub <noreply@github.com>
Fri, 26 Mar 2021 18:19:35 +0000 (11:19 -0700)
commit2b56a634579e4cdab8d84ccba138e701a6d3bc64
tree55314e7c98899656160baa6591b362271cb25f32
parentb85f47efd094dc9ebe210c364e235c6ef99f8417
Use a helper function to clarify gang block size

For gang blocks, `DVA_GET_ASIZE()` is the total space allocated for the
gang DVA including its children BP's.  The space allocated at each DVA's
vdev/offset is `vdev_psize_to_asize(vd, SPA_GANGBLOCKSIZE)`.

This commit makes this relationship more clear by using a helper
function, `vdev_gang_header_asize()`, for the space allocated at the
gang block's vdev/offset.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #11744
include/sys/spa.h
include/sys/vdev.h
module/zfs/metaslab.c
module/zfs/zio.c