]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/PGMonitor: MAX AVAIL is 0 if some OSDs' weight is 0 6660/head
authorChengyuan Li <chengyli@ebay.com>
Fri, 20 Nov 2015 05:29:39 +0000 (22:29 -0700)
committerChengyuan Li <chengyli@ebay.com>
Fri, 20 Nov 2015 09:26:58 +0000 (02:26 -0700)
commit18713e60edd1fe16ab571f7c83e6de026db483ca
treebf22e231292af170d7c4b6ad606f2922609db301
parent4bc39bcdda1b89501c6e193163bf563ad42db6c9
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>
src/mon/PGMonitor.cc