From: Sage Weil Date: Tue, 13 Nov 2012 00:31:35 +0000 (-0800) Subject: osdc/ObjectCacher: do not take Object ref for bh writes X-Git-Tag: v0.55~79^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=caed0e917f8044d389d01de5ee5ecbf0d16ff349;p=ceph.git osdc/ObjectCacher: do not take Object ref for bh writes This reverts commit 46897fd4ffc2fe2fc2cc0c39b5d4c510df1e6c25. There is no reason to carry a ref for the writes; it just makes things more confusing because the refs aren't used for lifecycle, only for LRU pinning. We would need to duplicate the close_object() conditional here for this to work right. This fixes #3431, in which a slow osd reply has an Object pinned, but when we try to truncate it away we hit the assert in can_close(). Signed-off-by: Sage Weil --- diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index 0229e39fd3cc..c8d2449e3c32 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -684,8 +684,6 @@ void ObjectCacher::bh_read_finish(int64_t poolid, sobject_t oid, loff_t start, void ObjectCacher::bh_write(BufferHead *bh) { ldout(cct, 7) << "bh_write " << *bh << dendl; - - bh->ob->get(); // finishers C_WriteCommit *oncommit = new C_WriteCommit(this, bh->ob->oloc.pool, @@ -794,9 +792,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; - ob->put(); - - // is the entire object set now clean? if (flush_set_callback && was_dirty_or_tx > 0 && oset->dirty_or_tx == 0) { // nothing dirty/tx