]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd: handle MOSDScrub2 36370/head
authorKefu Chai <kchai@redhat.com>
Thu, 30 Jul 2020 11:45:23 +0000 (19:45 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 30 Jul 2020 11:53:44 +0000 (19:53 +0800)
commit0aac33f05cc7f5c8a790a64f7d5718dee4eecf2b
tree0a64b4d49600cb6c193ed6e1488e64fdaa519e27
parentc8b5f84f49ef74609ba3ea69dea0764ef925ae85
crimson/osd: handle MOSDScrub2

MOSDScrub2 is sent from mgr for serving "ceph pg
{scrub|deep-scrub|repair}' commands when it's talking to a mimic and newer OSD.

ceph task checks if all pgs are scrubbed by looking at the `last_scrub_stamp` fields
in the `ceph pg dump` output. and it request the not-yet-scrubbed pgs a
deep scrub to ensure they are scrub before timeout.

in this change, crimson handles MOSDScrub2 by starting a remote peering
request, and the underlying peering_state will notify the corresponding
PG to start scrub. to get the test pass, a minimal implmentation is
added to update the scrub timestamp to `now` upon request of
peering_state.

we will need to add the correct scrubbing support later. but this is
enough for passing the thrasher test and for preparing for more tests
which uses the "ceph" task.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/osd.cc
src/crimson/osd/osd.h
src/crimson/osd/pg.cc
src/crimson/osd/pg.h