From fc25fc728fccb2857c7b0eedbb60e1d485d98b69 Mon Sep 17 00:00:00 2001 From: sageweil Date: Tue, 4 Sep 2007 05:56:17 +0000 Subject: [PATCH] fix lru midpoint calculation git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1780 29311d96-e01e-0410-9327-a35deaab8ce9 --- trunk/ceph/include/lru.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trunk/ceph/include/lru.h b/trunk/ceph/include/lru.h index 7e00a0e0b5146..27edff8fdc00c 100644 --- a/trunk/ceph/include/lru.h +++ b/trunk/ceph/include/lru.h @@ -207,7 +207,7 @@ class LRU { if (!lru_max) return; unsigned toplen = lru_top.get_length(); - unsigned topwant = (unsigned)(lru_midpoint * (double)lru_max); + unsigned topwant = (unsigned)(lru_midpoint * ((double)lru_max - lru_num_pinned)); while (toplen > 0 && toplen > topwant) { // remove from tail of top, stick at head of bot -- 2.39.5