]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/PeeringState.cc: don't let num_objects become negative 32857/head
authorNeha <nojha@redhat.com>
Sat, 14 Dec 2019 00:49:27 +0000 (00:49 +0000)
committerNathan Cutler <ncutler@suse.com>
Sat, 25 Jan 2020 10:17:32 +0000 (11:17 +0100)
commit9331abc54239d9114f7e8b091459cce66dc9b6de
tree424610b40605104e458de8fd0f022e487cfbb895
parent2da6ab2dd850c9dc88e7baafd16b7ede2da4cdb1
osd/PeeringState.cc: don't let num_objects become negative

If num_objects become negative, we may end up incorrectly setting
the PG_STATE_DEGRADED flag. Instead reset num_objects to zero and set
the PG_STATE_INCONSISTENT flag when this happens expecting scrub to fix
the inconsistency.

Fixes: https://tracker.ceph.com/issues/43308
Co-authored-by: David Zafman <dzafman@redhat.com>
Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit 54c5eca48ce94dc4a1416836a06203db880c3842)

Conflicts:
src/osd/PeeringState.cc
- file is missing in nautilus; backported the code change manually
  to src/osd/PG.cc
src/osd/PG.cc