]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/PeeringState.cc: don't let num_objects become negative 33331/head
authorNeha <nojha@redhat.com>
Sat, 14 Dec 2019 00:49:27 +0000 (00:49 +0000)
committerNathan Cutler <ncutler@suse.com>
Fri, 14 Feb 2020 14:21:37 +0000 (15:21 +0100)
commite7267e09118d0cd3560b1ec66bea06699f8706c4
treefdc705ba3681aeb66d83bb22e19486c1a69df560
parentd960563efabca8f69d3fdc34444e49bced5a65e8
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