From: Sage Weil Date: Fri, 11 Dec 2009 16:37:19 +0000 (-0800) Subject: osd: drop backlog on recovery completion (when we mark PG_STATE_CLEAN) X-Git-Tag: v0.19~252 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=072be5caa603d0e04ae786d95167f138b7e3c710;p=ceph.git osd: drop backlog on recovery completion (when we mark PG_STATE_CLEAN) --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 4ad31f5abe0f..b2081fb9c225 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1629,13 +1629,20 @@ void PG::_finish_recovery(Context *c) dout(10) << "_finish_recovery" << dendl; finish_sync_event = 0; purge_strays(); + update_stats(); if (state_test(PG_STATE_INCONSISTENT)) { dout(10) << "_finish_recovery requeueing for scrub" << dendl; osd->scrub_wq.queue(this); + } else if (log.backlog) { + ObjectStore::Transaction t; + drop_backlog(); + write_info(t); + write_log(t); + int tr = osd->store->apply_transaction(t); + assert(tr == 0); } - } else { dout(10) << "_finish_recovery -- stale" << dendl; }