]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/ReplicatedPG: only do agent mode calculations for positive values
authorSage Weil <sage@redhat.com>
Wed, 13 Aug 2014 17:34:53 +0000 (10:34 -0700)
committerSage Weil <sage@redhat.com>
Wed, 13 Aug 2014 17:35:55 +0000 (10:35 -0700)
commit4a5c93a90986de4510c50f0fba72ae7d5aed8a15
tree586686ab407168de94ec7fc2239ee5d494a90d06
parent39bcafa6f2b14e4e11e1541cf01f24525e2b6449
osd/ReplicatedPG: only do agent mode calculations for positive values

After a split we can get negative values here.  Only do the arithmetic if
we have a valid (positive) value that won't through the floating point
unit for a loop.

Fixes: #9082
Tested-by: Karan Singh <karan.singh@csc.fi>
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 5be56ff86d9f3ab2407a258a5285d0b8f52f041e)
src/osd/ReplicatedPG.cc