]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/scrub: replace a ceph_assert() with a test 41993/head
authorRonen Friedman <rfriedma@redhat.com>
Wed, 23 Jun 2021 17:02:28 +0000 (20:02 +0300)
committerRonen Friedman <rfriedma@redhat.com>
Wed, 23 Jun 2021 17:19:18 +0000 (20:19 +0300)
commit50fbfeffbe76ad683df2dd97e4f65ca6d980e91d
treef32eeb6651a7987b5d402a02ae31dc209e795f67
parentda5d094f2647a6a32316cdd11e40fce91c572df8
osd/scrub: replace a ceph_assert() with a test

We are using two distinct conditions to decide whether a candidate PG is already being scrubbed. The OSD checks pgs_scrub_active(), while the PG asserts on the value of PG_STATE_FLAG.
There is a time window when PG_STATE_FLAG is set but is_scrub_active() wasn't yet set. is_reserving() covers most of that period, but the ceph_assert is just before the is_reserving check.

fixes: https://tracker.ceph.com/issues/50346
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/PG.cc