dovecot: We don't really care if we lost a cache file or if it g...

dovecot at dovecot.org dovecot at dovecot.org
Thu Nov 8 18:20:13 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/a881755b3db8
changeset: 6735:a881755b3db8
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Nov 08 18:12:39 2007 +0200
description:
We don't really care if we lost a cache file or if it gets broken, so don't
ever fsync it unless mail_nfs_index=yes.

diffstat:

2 files changed, 2 insertions(+), 2 deletions(-)
src/lib-index/mail-cache-compress.c    |    2 +-
src/lib-index/mail-cache-transaction.c |    2 +-

diffs (24 lines):

diff -r da69c4853e35 -r a881755b3db8 src/lib-index/mail-cache-compress.c
--- a/src/lib-index/mail-cache-compress.c	Thu Nov 08 04:23:00 2007 +0200
+++ b/src/lib-index/mail-cache-compress.c	Thu Nov 08 18:12:39 2007 +0200
@@ -295,7 +295,7 @@ mail_cache_copy(struct mail_cache *cache
 
 	o_stream_destroy(&output);
 
-	if (!cache->index->fsync_disable) {
+	if (cache->index->nfs_flush) {
 		if (fdatasync(fd) < 0) {
 			mail_cache_set_syscall_error(cache, "fdatasync()");
 			array_free(ext_offsets);
diff -r da69c4853e35 -r a881755b3db8 src/lib-index/mail-cache-transaction.c
--- a/src/lib-index/mail-cache-transaction.c	Thu Nov 08 04:23:00 2007 +0200
+++ b/src/lib-index/mail-cache-transaction.c	Thu Nov 08 18:12:39 2007 +0200
@@ -716,7 +716,7 @@ mail_cache_header_fields_write(struct ma
 	if (mail_cache_write(cache, buffer->data, size, offset) < 0)
 		return -1;
 
-	if (!cache->index->fsync_disable) {
+	if (cache->index->nfs_flush) {
 		if (fdatasync(cache->fd) < 0) {
 			mail_cache_set_syscall_error(cache, "fdatasync()");
 			return -1;


More information about the dovecot-cvs mailing list