]> 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:34:53 +0000 (10:34 -0700)
commit5be56ff86d9f3ab2407a258a5285d0b8f52f041e
tree91ca575e9f9436b07f424d1c3225cd79c29e7736
parentea90d9f46b2716df6e10dccaed908fd235f2000c
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>
src/osd/ReplicatedPG.cc