]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/ObjectCacher: do not close objects explicitly
authorSage Weil <sage@inktank.com>
Tue, 23 Oct 2012 16:20:53 +0000 (09:20 -0700)
committerSage Weil <sage@inktank.com>
Fri, 26 Oct 2012 18:31:45 +0000 (11:31 -0700)
Let the trimmer do that.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osdc/ObjectCacher.cc

index e4a7e3195ed98cb400083173ce29e8ded24a88c0..8463657083cfd3be466c8ad2cd16ad54158b07be 100644 (file)
@@ -699,9 +699,6 @@ void ObjectCacher::lock_ack(int64_t poolid, list<sobject_t>& oids, tid_t tid)
       }
       
       ob->last_commit_tid = tid;
-      
-      if (ob->can_close())
-        close_object(ob);
     } else {
       ldout(cct, 10) << "lock_ack " << *ob 
                << " tid " << tid << " obsolete" << dendl;
@@ -782,8 +779,6 @@ void ObjectCacher::bh_write_commit(int64_t poolid, sobject_t oid, loff_t start,
 
     // is the entire object set now clean and fully committed?
     ObjectSet *oset = ob->oset;
-    if (ob->can_close())
-      close_object(ob);
     ob->put();
 
     // is the entire object set now clean?
@@ -839,11 +834,6 @@ void ObjectCacher::trim(loff_t max_bytes, loff_t max_ob)
     Object *ob = bh->ob;
     bh_remove(ob, bh);
     delete bh;
-    
-    if (ob->can_close()) {
-      ldout(cct, 10) << "trim trimming " << *ob << dendl;
-      close_object(ob);
-    }
   }
 
   while (ob_lru.lru_get_size() > max_ob) {
@@ -1454,11 +1444,6 @@ void ObjectCacher::purge(Object *ob)
   ldout(cct, 10) << "purge " << *ob << dendl;
 
   ob->truncate(0);
-
-  if (ob->can_close()) {
-    ldout(cct, 10) << "purge closing " << *ob << dendl;
-    close_object(ob);
-  }
 }
 
 
@@ -1665,7 +1650,7 @@ loff_t ObjectCacher::release(Object *ob)
   }
 
   if (ob->can_close()) {
-    ldout(cct, 10) << "trim trimming " << *ob << dendl;
+    ldout(cct, 10) << "release trimming " << *ob << dendl;
     close_object(ob);
     assert(o_unclean == 0);
     return 0;
@@ -1771,11 +1756,6 @@ void ObjectCacher::discard_set(ObjectSet *oset, vector<ObjectExtent>& exls)
     Object *ob = objects[oset->poolid][soid];
     
     ob->discard(ex.offset, ex.length);
-
-    if (ob->can_close()) {
-      ldout(cct, 10) << " closing " << *ob << dendl;
-      close_object(ob);
-    }
   }
 
   // did we truncate off dirty data?