From: Yan, Zheng Date: Thu, 3 Apr 2014 13:08:03 +0000 (+0800) Subject: ObjectCacher: assert no waiter when remove buffer head X-Git-Tag: v0.80-rc1~85^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f68e60ea6cee95e459535d54947d119b40e0af3c;p=ceph.git ObjectCacher: assert no waiter when remove buffer head Signed-off-by: Yan, Zheng --- diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index 33bba06d5e5f..3e41a5c5ba0d 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -443,6 +443,7 @@ void ObjectCacher::Object::truncate(loff_t s) // remove bh entirely assert(bh->start() >= s); + assert(bh->waitfor_read.empty()); oc->bh_remove(this, bh); delete bh; } @@ -482,6 +483,7 @@ void ObjectCacher::Object::discard(loff_t off, loff_t len) ++p; ldout(oc->cct, 10) << "discard " << *this << " bh " << *bh << dendl; + assert(bh->waitfor_read.empty()); oc->bh_remove(this, bh); delete bh; }