]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: set dirty flags on rewind_divergent_log
authorSage Weil <sage.weil@dreamhost.com>
Sun, 29 Apr 2012 15:11:06 +0000 (08:11 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Sun, 29 Apr 2012 15:11:25 +0000 (08:11 -0700)
Make sure we record any rewind_divergent_log.  In the activate case, this
will happen anyway, but mark it dirty here for correctness/completeness.

The merge_log case might be a bug.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/PG.cc

index f6342a4c12b6c1dcf00d72e190de32b4637851b4..7bcc642f351e6382a5f7eac38007515dc8e712ae 100644 (file)
@@ -354,6 +354,9 @@ void PG::rewind_divergent_log(ObjectStore::Transaction& t, eversion_t newhead)
 
   for (list<pg_log_entry_t>::iterator d = divergent.begin(); d != divergent.end(); d++)
     merge_old_entry(t, *d);
+
+  dirty_info = true;
+  dirty_log = true;
 }
 
 void PG::merge_log(ObjectStore::Transaction& t,
@@ -407,6 +410,7 @@ void PG::merge_log(ObjectStore::Transaction& t,
   // do we have divergent entries to throw out?
   if (olog.head < log.head) {
     rewind_divergent_log(t, olog.head);
+    changed = true;
   }
 
   // extend on head?