]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd/scrub: modify ScrubJob to hold two SchedTarget-s
authorRonen Friedman <rfriedma@redhat.com>
Fri, 12 Jul 2024 13:18:30 +0000 (08:18 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Sun, 25 Aug 2024 13:01:00 +0000 (08:01 -0500)
commit673f36099ea297c74908c087564df802c0f86a0b
treeaee47556bfbf25a5b26ab8fc5fc3821998dd168e
parent2b6e1dd90b73bf1db16f9ee1b7ad519be3ca97ba
osd/scrub: modify ScrubJob to hold two SchedTarget-s

ScrubJob will now hold two SchedTarget-s - two sets of scheduling
information (times, levels, etc.) for the next shallow and deep scrubs.

This is in preparation for the upcoming changes to the scheduling queue.
The change cannot stand on its own, as the partial implementation
creates some inconsistencies in the scheduling logic.

Specifically, here is what changes here, and how it differs from the
desired implementation:
- The OSD still maintains a queue of scrub jobs - one object only per
  PG.
  But now - each queue element holds two SchedTarget-s.
- When a scrub is initiated, the Scrubber is handed a ScrubJob object.
  Only in the next commit will it also receive the ID of the selected
  level. That causes some issues when re-determining the level of the
  initiated scrub. A failure to match the queue "intent" results in
  failures.
- the 'planned scrub' flags are still here, instead of directly
  encoding the characteristics of the next scrub in the relevant
  sched-entry.
- the 'urgency' levels do not cover the full required range of
  behaviors and priorities.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/scrubber/osd_scrub_sched.cc
src/osd/scrubber/pg_scrubber.cc
src/osd/scrubber/pg_scrubber.h
src/osd/scrubber/scrub_job.cc
src/osd/scrubber/scrub_job.h
src/osd/scrubber/scrub_machine_lstnr.h
src/osd/scrubber_common.h