]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: flush on activate
authorSage Weil <sage@newdream.net>
Wed, 8 Feb 2012 19:20:47 +0000 (11:20 -0800)
committerSage Weil <sage@newdream.net>
Wed, 8 Feb 2012 21:19:51 +0000 (13:19 -0800)
PG::activate() can make lots of changes, most notably clean_up_local()
which deletes lots of local objects.  Those changes need to be flushed
to the fs before we start servicing requests or else we risk processing a
client read on those objects.

Fixes: #1974
Signed-off-by: Sage Weil <sage@newdream.net>
src/osd/PG.cc

index e1e65125f6b6a6bc6124cb9ef24b54b8a79c0f01..5907dd1969aa23c11a2ccf54484d85876d2d58fd 100644 (file)
@@ -1367,6 +1367,10 @@ void PG::activate(ObjectStore::Transaction& t, list<Context*>& tfin,
     update_stats();
   }
 
+  // flush this all out (e.g., deletions from clean_up_local) to avoid
+  // subsequent races.
+  osr.flush();
+
   // waiters
   if (!is_replay()) {
     osd->requeue_ops(this, waiting_for_active);