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 <sage@inktank.com>
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,
// 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