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-26 13:10:19 -0700
commitcf2f31ac23b6eb43a81a1c8157907b9cae4d58a7 (patch)
treed004ff4d506e8089d0fa4046c8debb040b6caf47
parent02da55757a9fb53df4746db5dd14724e77da95b6 (diff)
downloadceph-cf2f31ac23b6eb43a81a1c8157907b9cae4d58a7.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> (cherry picked from commit 1c50c446152ab0e571ae5508edb4ad7c7614c310)
-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 81b59aa60ba..4ea9bd622d9 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);