mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
osd/PG: register recovery finish context directly on Transaction
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
643714ff96
commit
45e07480df
@ -2398,7 +2398,7 @@ unsigned PG::get_delete_priority()
|
||||
}
|
||||
}
|
||||
|
||||
void PG::finish_recovery(list<Context*>& tfin)
|
||||
Context *PG::finish_recovery()
|
||||
{
|
||||
dout(10) << "finish_recovery" << dendl;
|
||||
assert(info.last_complete == info.last_update);
|
||||
@ -2409,7 +2409,7 @@ void PG::finish_recovery(list<Context*>& tfin)
|
||||
* sync all this before purging strays. but don't block!
|
||||
*/
|
||||
finish_sync_event = new C_PG_FinishRecovery(this);
|
||||
tfin.push_back(finish_sync_event);
|
||||
return finish_sync_event;
|
||||
}
|
||||
|
||||
void PG::_finish_recovery(Context *c)
|
||||
@ -7760,7 +7760,8 @@ PG::RecoveryState::Clean::Clean(my_context ctx)
|
||||
if (pg->info.last_complete != pg->info.last_update) {
|
||||
ceph_abort();
|
||||
}
|
||||
pg->finish_recovery(*context< RecoveryMachine >().get_on_safe_context_list());
|
||||
Context *c = pg->finish_recovery();
|
||||
context< RecoveryMachine >().get_cur_transaction()->register_on_commit(c);
|
||||
|
||||
if (pg->is_active()) {
|
||||
pg->mark_clean();
|
||||
|
@ -1504,7 +1504,7 @@ protected:
|
||||
|
||||
Context *finish_sync_event;
|
||||
|
||||
void finish_recovery(list<Context*>& tfin);
|
||||
Context *finish_recovery();
|
||||
void _finish_recovery(Context *c);
|
||||
struct C_PG_FinishRecovery : public Context {
|
||||
PGRef pg;
|
||||
|
Loading…
Reference in New Issue
Block a user