This repository has been archived by the owner on May 3, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Problem: as desribed in issue #1838, there exists a case in which the failure domain tree built for a pool version has 4 levels (root, M0_CONF_PVER_LVL_ENCLS, M0_CONF_PVER_LVL_CTRLS, M0_CONF_PVER_LVL_DRIVES), the minimum number of children at top 3 level are 3, 1, 0. Although at the end of symm_tree_attr_get(), it calls tolerance_check() to check failure settings, tolerance_check() only checks the top 2 levels and ignores the 3rd level (M0_CONF_PVER_LVL_CTRLS). After the above checks, m0_fd__tile_init() is called and it calls pool_width_calc() which asserts that the minimum number of children at the top 3 level (root, M0_CONF_PVER_LVL_ENCLS, M0_CONF_PVER_LVL_CTRLS) is not 0, but as the number at the M0_CONF_PVER_LVL_CTRLS is 0, that leads to the panic. Solution: to avoid the panic, adding a check in symm_tree_attr_get() to ensure the minimum number of children at each level must be greater than 0, otherwise -EINVAL is returned. * conf: check pvs_tolerance is greater than 0 before decreasing it Signed-off-by: Sining Wu <sining.wu@seagate.com>
- Loading branch information