]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
objectcacher: avoid unnecessary flush_set calls
authorSage Weil <sage@newdream.net>
Wed, 18 Jun 2008 02:49:41 +0000 (19:49 -0700)
committerSage Weil <sage@newdream.net>
Wed, 18 Jun 2008 03:00:34 +0000 (20:00 -0700)
src/osdc/ObjectCacher.cc

index 4f611298f93fcb9db452d7c257fd2601c0ccc355..e2fe09ad8ae9c305ae39ca074b58b853e61de5a5 100644 (file)
@@ -1397,6 +1397,9 @@ bool ObjectCacher::commit_set(inodeno_t ino, Context *onfinish)
 
   dout(10) << "commit_set " << ino << dendl;
 
+  // make sure it's flushing.
+  flush_set(ino);
+
   C_Gather *gather = 0; // we'll need to wait for all objects to commit
 
   set<Object*>& s = objects_by_ino[ino];
@@ -1406,9 +1409,6 @@ bool ObjectCacher::commit_set(inodeno_t ino, Context *onfinish)
        i++) {
     Object *ob = *i;
     
-    // make sure it's flushing.
-    flush_set(ino);
-
     if (ob->last_write_tid > ob->last_commit_tid) {
       dout(10) << "commit_set " << ino << " " << *ob 
                << " will finish on commit tid " << ob->last_write_tid