]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/scrub: replace a ceph_assert() with a test 41944/head
authorRonen Friedman <rfriedma@redhat.com>
Wed, 23 Jun 2021 17:02:28 +0000 (20:02 +0300)
committerRonen Friedman <rfriedma@redhat.com>
Sat, 26 Jun 2021 15:49:09 +0000 (18:49 +0300)
commitc12d951d6d8d58e5bb84f11d4db55b8b1ae3df85
treeeec3574f493aa3af909d05e42b81978c41f17534
parent41a8f5ee6f625249b78c7fa8421419a771bf4076
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>
(cherry picked from commit 50fbfeffbe76ad683df2dd97e4f65ca6d980e91d)
src/osd/PG.cc