From 899ded6ea89632149d390e98c13c3d034a05bd0b Mon Sep 17 00:00:00 2001 From: sage Date: Thu, 21 Sep 2006 17:49:01 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@866 29311d96-e01e-0410-9327-a35deaab8ce9 --- ceph/ebofs/BufferCache.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ceph/ebofs/BufferCache.cc b/ceph/ebofs/BufferCache.cc index d269e72b264c7..bcb68b5910637 100644 --- a/ceph/ebofs/BufferCache.cc +++ b/ceph/ebofs/BufferCache.cc @@ -169,12 +169,14 @@ int ObjectCache::find_tx(block_t start, block_t len, block_t cur = start; block_t left = len; + /* don't care about overlap, we want things _fully_ in start~len. if (p != data.begin() && (p == data.end() || p->first > cur)) { p--; // might overlap! if (p->first + p->second->length() <= cur) p++; // doesn't overlap. } + */ while (left > 0) { assert(cur+left == start+len); @@ -187,7 +189,8 @@ int ObjectCache::find_tx(block_t start, block_t len, // have it (or part of it) BufferHead *e = p->second; - if (e->is_tx()) + if (e->end() <= start+len && + e->is_tx()) tx.push_back(e); block_t lenfromcur = MIN(e->end() - cur, left); -- 2.39.5