summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-09-20 08:46:29 -0700
committerSage Weil <sage@inktank.com>2013-09-20 08:46:29 -0700
commit04de6a839f6a42e50b13dbda9513f0df1de47ee7 (patch)
tree25b6180835697e7acdf71ef66429a5c562e2f9cb
parent0681971e62ccd5b09c0876c767fa6d64ea2a5daf (diff)
parentb66ac77fa7aa3ff37804918c4308a348f239af09 (diff)
downloadceph-04de6a839f6a42e50b13dbda9513f0df1de47ee7.tar.gz
Merge pull request #590 from ceph/wip-6284
osdc/ObjectCacher: finish contexts after dropping object reference Tested: ubuntu@teuthology:/a/sage-2013-09-19_19:40:56-fs-wip-6284-testing-basic-plana Reviewed-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/osdc/ObjectCacher.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc
index 01eeccc03be..590b5d473a8 100644
--- a/src/osdc/ObjectCacher.cc
+++ b/src/osdc/ObjectCacher.cc
@@ -899,11 +899,10 @@ void ObjectCacher::bh_write_commit(int64_t poolid, sobject_t oid, loff_t start,
ob->last_commit_tid = tid;
// waiters?
+ list<Context*> ls;
if (ob->waitfor_commit.count(tid)) {
- list<Context*> ls;
ls.splice(ls.begin(), ob->waitfor_commit[tid]);
ob->waitfor_commit.erase(tid);
- finish_contexts(cct, ls, r);
}
// is the entire object set now clean and fully committed?
@@ -915,6 +914,9 @@ void ObjectCacher::bh_write_commit(int64_t poolid, sobject_t oid, loff_t start,
oset->dirty_or_tx == 0) { // nothing dirty/tx
flush_set_callback(flush_set_callback_arg, oset);
}
+
+ if (!ls.empty())
+ finish_contexts(cct, ls, r);
}
}