From ac76a28d027d983887273856a3ceebdf4935bfa7 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 16 May 2008 18:39:03 +0000 Subject: [PATCH] HAMMER Utilities: Stabilization pass. * Fix a bug in 'hammer show' which caused the cache to expand indefinitely. --- sbin/hammer/cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sbin/hammer/cache.c b/sbin/hammer/cache.c index 0346c9c09d..ee6637bada 100644 --- a/sbin/hammer/cache.c +++ b/sbin/hammer/cache.c @@ -31,7 +31,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sbin/hammer/cache.c,v 1.4 2008/02/08 08:30:56 dillon Exp $ + * $DragonFly: src/sbin/hammer/cache.c,v 1.5 2008/05/16 18:39:03 dillon Exp $ */ #include @@ -46,7 +46,7 @@ #include "hammer_util.h" static int CacheUse; -static int CacheMax = 8 * 1024 * 1024; +static int CacheMax = 16 * 1024 * 1024; static int NCache; static TAILQ_HEAD(, cache_info) CacheList = TAILQ_HEAD_INITIALIZER(CacheList); @@ -90,6 +90,7 @@ hammer_cache_flush(void) } cache->refs = 1; cache->delete = 1; + --count; switch(cache->type) { case ISVOLUME: -- 2.11.4.GIT