]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/ObjectCacher: do not merge rx buffers
authorSage Weil <sage@inktank.com>
Fri, 16 Aug 2013 04:48:06 +0000 (21:48 -0700)
committerSage Weil <sage@inktank.com>
Fri, 16 Aug 2013 05:20:21 +0000 (22:20 -0700)
We do not try to merge rx buffers currently.  Make that explicit and
documented in the code that it is not supported.  (Otherwise the
last_read_tid values will get lost and read results won't get applied
to the cache properly.)

Signed-off-by: Sage Weil <sage@inktank.com>
src/osdc/ObjectCacher.cc

index 8dd9de26cf6a63e7160288fe2c237835ffdd9396..01eeccc03be2bf4c5e251c0350ce9b78f0640d2e 100644 (file)
@@ -114,6 +114,10 @@ void ObjectCacher::Object::try_merge_bh(BufferHead *bh)
   assert(oc->lock.is_locked());
   ldout(oc->cct, 10) << "try_merge_bh " << *bh << dendl;
 
+  // do not merge rx buffers; last_read_tid may not match
+  if (bh->is_rx())
+    return;
+
   // to the left?
   map<loff_t,BufferHead*>::iterator p = data.find(bh->start());
   assert(p->second == bh);