1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
5 // the './' includes are marked this way to affect clang-format
6 #include "./pg_scrubber.h"
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"
18 #include "scrub_machine.h"
23 * The derivative of PgScrubber that is used by PrimaryLogPG.
25 class PrimaryLogScrub
: public PgScrubber
{
27 explicit PrimaryLogScrub(PrimaryLogPG
* pg
);
29 void _scrub_finish() final
;
31 bool get_store_errors(const scrub_ls_arg_t
& arg
,
32 scrub_ls_result_t
& res_inout
) const final
;
34 void stats_of_handled_objects(const object_stat_sum_t
& delta_stats
,
35 const hobject_t
& soid
) final
;
37 // the interface used by the scrubber-backend:
39 void add_to_stats(const object_stat_sum_t
& stat
) final
;
41 void submit_digest_fixes(const digests_fixes_t
& fixes
) final
;
44 // we know our PG is actually a PrimaryLogPG. Let's alias the pointer to that
46 PrimaryLogPG
* const m_pl_pg
;
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