From: Jianpeng Ma Date: Thu, 29 Jan 2015 08:41:49 +0000 (+0800) Subject: osdc: touch hit bh although there are missing or rx bh. X-Git-Tag: v0.93~139^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3d38e1f56c0d28ece279f349673e8e45ee276a23;p=ceph.git osdc: touch hit bh although there are missing or rx bh. Avoid losing the hit bh when later read, it should touch hit bh like rx bh. Signed-off-by: Jianpeng Ma --- diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index 95a4bda13e29..fff85e5c811a 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -1157,7 +1157,12 @@ int ObjectCacher::_readx(OSDRead *rd, ObjectSet *oset, Context *onfinish, } bytes_not_in_cache += bh_it->second->length(); success = false; - } + } + + for (map::iterator bh_it = hits.begin(); + bh_it != hits.end(); ++bh_it) + touch_bh(bh_it->second); //bump in lru, so we don't lose it when later read + } else { assert(!hits.empty());