mirror of
https://github.com/ceph/ceph
synced 2025-01-20 18:21:57 +00:00
osd/PG: move C_PG_FinishRecovery into header
Less code than delcaring it in 2 places (by making it a friend). Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
059158569c
commit
ca4ba9b4f6
@ -1988,14 +1988,6 @@ unsigned PG::get_scrub_priority()
|
||||
return pool_scrub_priority > 0 ? pool_scrub_priority : cct->_conf->osd_scrub_priority;
|
||||
}
|
||||
|
||||
struct C_PG_FinishRecovery : public Context {
|
||||
PGRef pg;
|
||||
explicit C_PG_FinishRecovery(PG *p) : pg(p) {}
|
||||
void finish(int r) override {
|
||||
pg->_finish_recovery(this);
|
||||
}
|
||||
};
|
||||
|
||||
void PG::mark_clean()
|
||||
{
|
||||
if (actingset.size() == get_osdmap()->get_pg_size(info.pgid.pgid)) {
|
||||
|
@ -1187,9 +1187,14 @@ protected:
|
||||
Context *finish_sync_event;
|
||||
|
||||
void finish_recovery(list<Context*>& tfin);
|
||||
public:
|
||||
void _finish_recovery(Context *c);
|
||||
protected:
|
||||
struct C_PG_FinishRecovery : public Context {
|
||||
PGRef pg;
|
||||
explicit C_PG_FinishRecovery(PG *p) : pg(p) {}
|
||||
void finish(int r) override {
|
||||
pg->_finish_recovery(this);
|
||||
}
|
||||
};
|
||||
void cancel_recovery();
|
||||
void clear_recovery_state();
|
||||
virtual void _clear_recovery_state() = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user