summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-08-15 21:48:06 -0700
committerSage Weil <sage@inktank.com>2013-08-15 22:20:21 -0700
commit1c50c446152ab0e571ae5508edb4ad7c7614c310 (patch)
tree145a81f13a13acafec2fc033fde2e59c9c7259a9
parentb59f930ae147767eb4c9ff18c3821f6936a83227 (diff)
downloadceph-1c50c446152ab0e571ae5508edb4ad7c7614c310.tar.gz
osdc/ObjectCacher: do not merge rx buffers
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>
-rw-r--r--src/osdc/ObjectCacher.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc
index 8dd9de26cf6..01eeccc03be 100644
--- a/src/osdc/ObjectCacher.cc
+++ b/src/osdc/ObjectCacher.cc
@@ -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);