Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mon/PGMonitor: MAX AVAIL is 0 if some OSDs' weight is 0
In get_rule_avail(), even p->second is 0, it's possible to be used as divisor and quotient is infinity, then is converted to an integer which is negative value. So we should check p->second value before calculation. It fixes BUG #13840. Signed-off-by: Chengyuan Li <chengyli@ebay.com> (cherry picked from commit 18713e6)
- Loading branch information