From cd2ce96754ef10926057dd76a203325c35384074 Mon Sep 17 00:00:00 2001 From: dormando Date: Wed, 18 Oct 2017 00:42:58 -0700 Subject: extstore: configure and start time gating ./configure --enable-extstore to compile the feature in specify -o ext_path=/whatever to start. --- items.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'items.c') diff --git a/items.c b/items.c index f02ccb9..889c328 100644 --- a/items.c +++ b/items.c @@ -1553,13 +1553,15 @@ static void *lru_maintainer_thread(void *arg) { int did_moves = lru_maintainer_juggle(i); #ifdef EXTSTORE // Deeper loop to speed up pushing to storage. - for (x = 0; x < 500; x++) { - int found; - found = lru_maintainer_store(storage, i); - if (found) { - did_moves += found; - } else { - break; + if (storage) { + for (x = 0; x < 500; x++) { + int found; + found = lru_maintainer_store(storage, i); + if (found) { + did_moves += found; + } else { + break; + } } } #endif -- cgit v1.2.1