aboutsummaryrefslogtreecommitdiffstats
path: root/config/zfs-build.m4
diff options
context:
space:
mode:
authorOlaf Faaland <[email protected]>2017-09-22 14:29:26 -0700
committerBrian Behlendorf <[email protected]>2017-09-22 14:29:26 -0700
commitd410c6d9fd4db812a1009e1603c89f1e222e1875 (patch)
treecebf0f6e030ea99eff0847d8e866217af0773b59 /config/zfs-build.m4
parent5df5d06a8d86af475e90fe7dd86ea044f937be66 (diff)
Reimplement vdev_random_leaf and rename it
Rename it as mmp_random_leaf() since it is defined in mmp.c. The earlier implementation could end up spinning forever if a pool had a vdev marked writeable, none of whose children were writeable. It also did not guarantee that if a writeable leaf vdev existed, it would be found. Reimplement to recursively walk the device tree to select the leaf. It searches the entire tree, so that a return value of (NULL) indicates there were no usable leaves in the pool; all were either not writeable or had pending mmp writes. It still chooses the starting child randomly at each level of the tree, so if the pool's devices are healthy, the mmp writes go to random leaves with an even distribution. This was verified by testing using zfs_multihost_history enabled. Reviewed by: Thomas Caputi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Olaf Faaland <[email protected]> Closes #6631 Closes #6665
Diffstat (limited to 'config/zfs-build.m4')
0 files changed, 0 insertions, 0 deletions