dovecot: mmap_disable=yes: Don't flush NFS caches if mail_nfs_in...

dovecot at dovecot.org dovecot at dovecot.org
Tue Nov 6 18:27:33 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/16fc51385cd1
changeset: 6700:16fc51385cd1
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Nov 06 18:27:29 2007 +0200
description:
mmap_disable=yes: Don't flush NFS caches if mail_nfs_index=no.

diffstat:

1 file changed, 5 insertions(+), 2 deletions(-)
src/lib-index/mail-cache.c |    7 +++++--

diffs (17 lines):

diff -r faa4da358d37 -r 16fc51385cd1 src/lib-index/mail-cache.c
--- a/src/lib-index/mail-cache.c	Tue Nov 06 18:08:58 2007 +0200
+++ b/src/lib-index/mail-cache.c	Tue Nov 06 18:27:29 2007 +0200
@@ -77,8 +77,11 @@ static void mail_cache_init_file_cache(s
 	if (cache->file_cache == NULL)
 		return;
 
-	nfs_flush_attr_cache_fd(cache->filepath, cache->fd);
-	nfs_flush_read_cache(cache->filepath, cache->fd, F_UNLCK, FALSE);
+	if (cache->index->nfs_flush) {
+		nfs_flush_attr_cache_fd(cache->filepath, cache->fd);
+		nfs_flush_read_cache(cache->filepath, cache->fd,
+				     F_UNLCK, FALSE);
+	}
 
 	file_cache_set_fd(cache->file_cache, cache->fd);
 


More information about the dovecot-cvs mailing list