]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ObjectCacher: assert no waiter when remove buffer head
authorYan, Zheng <zheng.z.yan@intel.com>
Thu, 3 Apr 2014 13:08:03 +0000 (21:08 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Fri, 4 Apr 2014 16:49:37 +0000 (00:49 +0800)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/osdc/ObjectCacher.cc

index 33bba06d5e5f8c7bb1e14a582d9912c5d9a596b7..3e41a5c5ba0d9e53db3639b55deb78b5b9861504 100644 (file)
@@ -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;
   }