#include "read-full.h"
#include "write-full.h"
#include "mail-cache-private.h"
+#include "ioloop.h"
#include <unistd.h>
if (cache->mmap_base == MAP_FAILED) {
cache->mmap_base = NULL;
cache->mmap_length = 0;
- mail_cache_set_syscall_error(cache, t_strdup_printf(
- "mmap(size=%"PRIuSIZE_T")", cache->mmap_length));
+ if (ioloop_time != cache->last_mmap_error_time) {
+ cache->last_mmap_error_time = ioloop_time;
+ mail_cache_set_syscall_error(cache, t_strdup_printf(
+ "mmap(size=%"PRIuSIZE_T")", cache->mmap_length));
+ }
return -1;
}
*data_r = offset > cache->mmap_length ? NULL :