From 67e996596247fc44b686599d46b8555420c180eb Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 5 Dec 2013 00:11:40 +0000 Subject: [PATCH] Do not resize statfile if old_size == new_size. --- src/statfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/statfile.c b/src/statfile.c index b5d467426..9cc2d58f3 100644 --- a/src/statfile.c +++ b/src/statfile.c @@ -307,7 +307,7 @@ statfile_pool_open (statfile_pool_t * pool, gchar *filename, size_t size, gboole } memory_pool_lock_mutex (pool->lock); - if (!forced && size > sizeof (struct stat_file)) { + if (!forced && size != (size_t)st.st_size && size > sizeof (struct stat_file)) { memory_pool_unlock_mutex (pool->lock); msg_warn ("need to reindex statfile old size: %Hz, new size: %Hz", st.st_size, size); return statfile_pool_reindex (pool, filename, st.st_size, size); -- 2.39.5