mirror of
https://github.com/ceph/ceph
synced 2025-01-31 15:32:38 +00:00
osdc/ObjectCacher: take Object ref for bh writes
Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
21dc0e0262
commit
46897fd4ff
@ -617,6 +617,8 @@ 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,
|
||||
@ -777,6 +779,7 @@ void ObjectCacher::bh_write_commit(int64_t poolid, sobject_t oid, loff_t start,
|
||||
ObjectSet *oset = ob->oset;
|
||||
if (ob->can_close())
|
||||
close_object(ob);
|
||||
ob->put();
|
||||
|
||||
// is the entire object set now clean?
|
||||
if (flush_set_callback &&
|
||||
|
Loading…
Reference in New Issue
Block a user