]> git.proxmox.com Git - ceph.git/blob - ceph/src/osd/scrubber/PrimaryLogScrub.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / osd / scrubber / PrimaryLogScrub.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 #pragma once
4
5 // the './' includes are marked this way to affect clang-format
6 #include "./pg_scrubber.h"
7
8 #include "debug.h"
9
10 #include "common/errno.h"
11 #include "common/scrub_types.h"
12 #include "messages/MOSDOp.h"
13 #include "messages/MOSDRepScrub.h"
14 #include "messages/MOSDRepScrubMap.h"
15 #include "messages/MOSDScrubReserve.h"
16 #include "osd/OSD.h"
17
18 #include "scrub_machine.h"
19
20 class PrimaryLogPG;
21
22 /**
23 * The derivative of PgScrubber that is used by PrimaryLogPG.
24 */
25 class PrimaryLogScrub : public PgScrubber {
26 public:
27 explicit PrimaryLogScrub(PrimaryLogPG* pg);
28
29 void _scrub_finish() final;
30
31 bool get_store_errors(const scrub_ls_arg_t& arg,
32 scrub_ls_result_t& res_inout) const final;
33
34 void stats_of_handled_objects(const object_stat_sum_t& delta_stats,
35 const hobject_t& soid) final;
36
37 // the interface used by the scrubber-backend:
38
39 void add_to_stats(const object_stat_sum_t& stat) final;
40
41 void submit_digest_fixes(const digests_fixes_t& fixes) final;
42
43 private:
44 // we know our PG is actually a PrimaryLogPG. Let's alias the pointer to that
45 // object:
46 PrimaryLogPG* const m_pl_pg;
47
48 // handle our part in stats collection
49 object_stat_collection_t m_scrub_cstat;
50 void _scrub_clear_state() final; // which just clears the stats
51 };